Search Results

Search found 35302 results on 1413 pages for 'string literals'.

Page 114/1413 | < Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >

  • String array definition in JAVA

    - by Mohamed KALLEL
    Is it possible to define array in this way in JAVA, otherwise are there an alternative close this definition? private final int CONST_0= 0; private final int CONST_1= 1; private final int CONST_2= 2; private final int CONST_3= 3; private final String[] CONST_TXTRECORDS = new String[] {[CONST_0] = "test0", {[CONST_1] = "test1", {[CONST_2] = "test2", {[CONST_3] = "test3"};

    Read the article

  • Letter Count on a string

    - by user74283
    Python newb here. I m trying to count the number of letter "a"s in a given string. Code is below. It keeps returning 1 instead 3 in string "banana". Any input appreciated. def count_letters(word, char): count = 0 while count <= len(word): for char in word: if char == word[count]: count += 1 return count print count_letters('banana','a')

    Read the article

  • Multiple Regex on String

    - by George
    How can I apply multiple regexs to a single string? For instance, a user inputs the following into a text area: red bird blue cat black dog and I want to replace each carriage return with a comma and each space with an underscore so the final string reads as red_bird,blue_cat,black_dog. I've tried variations in syntax along the lines of the following so far: function formatTextArea() { var textString = document.getElementById('userinput').value; var formatText = textString.replace( new RegExp( "\\n", "g" ),",", new RegExp( "\\s", "g"),"_"); alert(formatText); }

    Read the article

  • Push SVG String into Dom?

    - by Colin
    I have a javascript variable that basically looks like this: my_svg_image = '<circle cx="227.58331298828125" cy="102" r="3" style="fill:black;stroke-width:0" />'; It was loaded from my database. Is there a way I can parse that string and add it to the DOM with Javascript? I have svgweb set up, but don't see how I can get it to parse this string. Are there other libraries that might help?

    Read the article

  • Length of Encrypted String

    - by Agnel Kurian
    I need to create a database column which will store a string encrypted using Triple DES. How do I determine the length of the encrypted string column? (Answers for algorithms other than Triple DES are also welcome.)

    Read the article

  • Ptyhon date string to date object

    - by elif
    Hi all, How do I convert a string to a date object in python? The string would be: "24052010" (corresponding to the format: "%d%m%Y") I DON'T want a datetime object. I suspect that I'm asking a trivial question but I searched and couldn't find it neither on stackoverflow nor on google. Thank you, Elif

    Read the article

  • trim a string in jquery

    - by amit
    i need to trim a string to its first 100 characters using jquery/javascript. also is it possible to scan a string and look for a particular combination of keywords such as #key? thanks a lot for the help.

    Read the article

  • How to manipulate a string, variable in shell

    - by user558134
    Hei everyone! I have this variable in shell containing paths separated by a space: LINE="/path/to/manipulate1 /path/to/manipulate2" I want to add additional path string in the beginning of the string and as well right after the space so that the variable will have the result something like this: LINE="/additional/path1/to/path/to/manipulate1 additional/path2/to/path/to/manipulate2" Any help appreciated Thanks in advance

    Read the article

  • Extracting a sub-string in C#

    - by hero
    I am new to c# programming and I want to ask a question. How can I get the value in () and store it in another string. example: I have string s1="here there (hi)"; How can I get s2="hi"; the () will always be at the end of the sentence (never at first or in between).

    Read the article

  • Xerces conflicts string.h

    - by Velthune
    Compiling my program I have this error: /usr/include/xercesc/util/Compilers/GCCDefs.hpp:133:60: error: declaration of ‘int strcasecmp(const char*, const char*)’ has a different exception specifier /usr/include/string.h:536:12: error: from previous declaration ‘int strcasecmp(const char*, const char*) throw ()’ make: *** [src/test/VFTImageMaterial.o] Error 1 Any idea about this conflict with string.h?

    Read the article

  • PHP string parsing

    - by tmatthews
    I am trying to parse a list of operating system instances with their unique identifiers. I am looking for a solution to parse a text string, and pass the values into two variables. The string to be parsed is as followed: "Ubuntu 9.10" {40f2324d-a6b2-44e4-90c3-0c5fa82c987d}

    Read the article

  • broken UTF-8 String ruby

    - by josh
    While reading a file I get broken UTF-8 String error whenever I have the following in my file través if I change it to normal e then it works. Whats the way to fix this? error only happens if I do line.lstrp or any other function. Just printing the lines is ok. problem even happens when I try to match the string with regex.

    Read the article

  • R table column order when including the empty string

    - by Libo Cannici
    I have a series of value that include the empty string levels(mydata$phone_partner_products) "" "dont_know" "maybe_interesting" "not_interesting" "very_interesting" "very_not_interesting" If I make a frequencies table I get this table(mydata$phone_partner_products) dont_know maybe_interesting 3752 226 2907 not_interesting very_interesting very_not_interesting 1404 1653 1065 How can I reorder the columns in a more meaningful way? How can I rename the empty string "" level? Thank you a lot in advance.

    Read the article

  • How to retrieve values of an enumeration of given string literal

    - by TonyP
    Need to get a value of an enumeration of a given string literal like "xlCenter" (these values are cut and pasted from Excel Macro). I would like to retrieve the actual constant value (int) -4108="xLCenter" via com marshaling is this possible ? if so how ? Ideally I am looking for function like this public int ExcelConstant(string constantName) { ...} Thanks

    Read the article

< Previous Page | 110 111 112 113 114 115 116 117 118 119 120 121  | Next Page >