Search Results

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

Page 75/1413 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Manually parse string as XAML Attribute

    - by bitbonk
    How does the XAML Parser convert the string "Red" in Foreground="Red" to a SolidColorBrush? Allthough I know the Types have System.ComponentModel.TypeConverter defined, I doupt that the WPF XAML parser acutally always uses those to convert the string to the brush. Are there any XAML APIs apart from XamlReader.Load (wich wants a valid xml string) that I could use to parse a single string as if it where an attibute for a certain property?

    Read the article

  • SQL: convert tokens in a string or elements of an array into rows of a table

    - by slowpoison
    Is there a simple way in SQL to convert a string or an array to rows of a table? For example, let's stay the string is 'a,b,c,d,e,f,g'. I'd prefer an SQL statement that takes that string, splits it at commas and inserts the resulting strings into a table. In PostgreSQL I can use regexp_split_to_array() and split the string into an array. So, if you know a way to insert an array's elements as rows into a table, that would work too.

    Read the article

  • Nothing else but Regex for matching the string.

    - by Harikrishna
    I want to check whether there is string starting from number and then optional character with the help of the regex.So what should be the regex for matching the string which must be started with number and then character might be there or not.Like there is string "30a" or "30" it should be matched.But if there is "a" or some else character or sereis of characters, string should not be matched.

    Read the article

  • Converting Unicode strings to escaped ascii string

    - by Ali
    How can I convert this string: This string contains the unicode character Pi(p) into an escaped ascii string: This string contains the unicode character Pi(\u03a0) and vice versa ? The current Encoding available in C#, converts the p character into "?". I need to preserve that character.

    Read the article

  • How to format this string in c#

    - by Rohit
    I have a setting stored in database which has a value .jpg|.gif|.png . I want to display it on frontend as ".jpg",".gif" and ".png" in a single string. for example Allowed formats are ".jpg",".gif" and ".png" I was able to seperate it using string fileTypes = String.Join(",", supportedFileTypes.Split('|')) How to specify and clause before the last string. It has to be dynamic. For example if we have .jpg|.gif in database, it should be Allowed formats are ".jpg" and ".gif".

    Read the article

  • cocoa - converting a double to string

    - by Mike
    I have a double number and I would like to convert it to string. The number is, for example, something like 24.043333332154465777... but if I convert it to string using something like NSString *myString = [NSString stringWithFormat:@"%f", myDouble]; The string is just 24.043333 how do I get a full string the corresponds to the whole double number? What other methods do I have to convert this?

    Read the article

  • Case-Insensitive String Comparison not working in C#?

    - by SB2055
    Based on the answer to this question: C# Case insensitive string compare I'm trying to do a case-insensitive comparison without using Compare or ToLower: var user = db.Users.FirstOrDefault(s => String.Equals(s.Username, username, StringComparison.OrdinalIgnoreCase)); However I get an error: Incorrect number of arguments supplied for call to method 'Boolean Equals(System.String, System.String, System.StringComparison)' What am I doing wrong?

    Read the article

  • Render an asp.net control from a text string

    - by madness
    Hi All, I'm not sure if it is possible to render an asp.net control from a string. The string contains fragments of html code and I've tried rendering that string to a div tag with runat="server" set, asp panel contain, asp lalbel control and asp literal control. All of them doesn't render the asp control in that text to an actual control, it just come up as a string. I've tried adding <% % around them and it appears it doesn't like it. Thanks in advance.

    Read the article

  • C++ Program Always Crashes While doing a std::string assign

    - by bbazso
    I have been trying to debug a crash in my application that crashes (i.e. asserts a * glibc detected free(): invalid pointer: 0x000000000070f0c0 **) while I'm trying to do a simple assign to a string. Note that I'm compiling on a linux system with gcc 4.2.4 with an optimization level set to -O2. With -O0 the application no longer crashes. E.g. std::string abc; abc = "testString"; but if I changed the code as follows it no longer crashes std::string abc("testString"); So again I scratched my head! But the interesting pattern was that the crash moved later on in the application, AGAIN at another string. I found it weird that the application was continuously crashing on a string assign. A typical crash backtrace would look as follows: #0 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 #1 0x00007f2c2663dbc3 in abort () from /lib64/libc.so.6 #2 0x00000000004d8cb7 in people_streamingserver_sighandler (signum=6) at src/peoplestreamingserver.cpp:487 #3 <signal handler called> #4 0x00007f2c2663bfb5 in raise () from /lib64/libc.so.6 #5 0x00007f2c2663dbc3 in abort () from /lib64/libc.so.6 #6 0x00007f2c26680ce0 in ?? () from /lib64/libc.so.6 #7 0x00007f2c270ca7a0 in std::string::assign (this=0x7f2c21bc8d20, __str=<value optimized out>) at /home/bbazso/ThirdParty/sources/gcc-4.2.4/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:238 #8 0x00007f2c21bd874a in PEOPLESProtocol::GetStreamName (this=<value optimized out>, pRawPath=0x2342fd8 "rtmp://127.0.0.1/mp4:pop.mp4", lStreamName=@0x7f2c21bc8d20) at /opt/trx-HEAD/gcc/4.2.4/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../include/c++/4.2.4/bits/basic_string.h:491 #9 0x00007f2c21bd9daa in PEOPLESProtocol::SignalProtocolCreated (pProtocol=0x233a4e0, customParameters=@0x7f2c21bc8de0) at peoplestreamer/src/peoplesprotocol.cpp:240 This was really weird behavior and so I started to poke around further in my application to see if there was some sort of memory corruption (either heap or stack) error that could be occurring that could be causing this weird behavior. I even checked for ptr corruptions and came up empty handed. In addition to visual inspection of the code I also tried the following tools: Valgrind using both memcheck and exp-ptrcheck electric fence libsafe I compiled with -fstack-protector-all in gcc I tried MALLOC_CHECK_ set to 2 I ran my code through lint checks as well as cppcheck (to check for mistakes) And I stepped through the code using gdb So I tried a lot of stuff and still came up empty handed. So I was wondering if it could be something like a linker issue or a library issue of some sort that could be causing this problem. Are there any know issues with the std::string that make is susceptible to crashing in -O2 or maybe it has nothing to do with the optimization level? But the only pattern that I can see thus far in my problem is that it always seems to crash on a string and so I was wondering if anyone knew of any issues that my be causing this type of behavior. Thanks a lot!

    Read the article

  • How to read empty string in c

    - by russell
    I have a problem with reading empty string in c.I want to read string from the following - 1.ass 2.ball 3.(empty) 4.cat but when i use gets() it does not treat (empty) as string[3].it read 'cat' as string[3].So how can i solve this problem.Which thing should i use?? plz someone help.

    Read the article

  • formtastic - :string field value as Array and not found-s

    - by Alexey Poimtsev
    Hi, is there any possibility to send from formtastic form value of :string field like - semantic_form_for :project do |form| - form.inputs do = form.input :task_ids, :as => :string as Array? Currently value of this field is sending as String and i'd like to no parse this string in controller. Also, could you give me idea - if task with submitted id is not found - what is best way to catch this situation - validation in controller or what?

    Read the article

  • Change A Character In A String Using Actionscript

    - by Joshua
    What is the opposite of String.charAt()?? If I Have a string: var Str:String="Hello World"; How do I change the 5th character, for example, from a ' ' to an '_'? I can GET the 5th character like this: var C:String=Str.charAt(5); But how do I SET the 5th character? Thanks in advance.

    Read the article

  • read length of string from stdin

    - by teoz
    I want to take a string from stdin but I don't want a static array of fixed size I know that scanf need something where save the stdin input, but I can't do something like this: char string[10] scanf("%s",string); becouse I need to know before how long will be the string in order to allocate the right memory space. Can you help me to resolve this problem?

    Read the article

  • How to pass a resource file string to a function in an external .js file

    - by hima
    Hi , There is a Messages.resx file under App_GlobalResources in my solution. Everytime i create a string and give a value to the string internal static string Alert_EnterUserName { get { return ResourceManager.GetString("Alert_EnterUserName", resourceCulture); } } is created automatically. Can anybody guide me how to use this string in a function which is present in a seperate .js file? Thanks in advance

    Read the article

  • Position of character in a string

    - by Irfan
    I have a string : var str = "12345a45";//position is 6 here now i want the position of 'a'(alphabet) in that string similarly i have few more string like this: var str1 = "1234567a45";//position is 8 here var str2 = "12345a4";//position is 6 here var str3 = "123a";//position is 4 here var str4 = "a45";//position is 1 here Now what i thought of doing is , just searching the string from last and know the occurrence of any alphabet in that strings. any help will be appreciated . thanks.

    Read the article

  • Find a regular expression that matches a string?

    - by Mirai
    I need a model for finding all of the regular expressions that would match a particular string. Basically, I need an algorithm for doing what I do to generate a regex search string from some pattern. My purpose for this to create a list of potential regular expressions from a selection of text and order that list from least specific (i.e. string of characters with abitrary length) to most specific (i.e. the string itself) to be used in text editor.

    Read the article

  • R - indirectly calling a matrix using a string

    - by Boris Senderovich
    Example: There is a matrix of data called VE There is a vector of string where the first element is the string VE. I need to indirectly call the string and be able to access data. For example if I need the 6th column of matrix VE then I want to do: Vector[1][,6] Essentially I need R to start reading those string as if they are the matrix names that are already in this page. I need this syntax to be dynamic because I am putting it in a loop.

    Read the article

  • Java - String Pool

    - by Gogi
    What is meant by String Pool ? What is difference between the following declarations : String s="hello"; String s=new String("hello"); Is there any difference between the Storing of this two strings by JVM ?

    Read the article

  • read lenght of string from stdin

    - by teoz
    I want to take a string from stdin but I don't want a static array of fixed size i knew that scanf need something where save the stdin input, but i can't do something like this: char string[10] scanf("%s",string); becouse i need to knew before how long will be the string in order to allocate the right memory space can you help me to resolve this problem?

    Read the article

  • Need to split a string into two parts in java

    - by Reddy
    I have a string which contains a contiguous chunk of digits and then a contiguous chunk of characters. I need to split them into two parts (one integer part, and one string). I tried using String.split("\D", 1), but it is eating up first character. I checked all the String API and didn't find a suitable method. Is there any method for doing this thing?

    Read the article

  • JavaScript regular expressions to validate string

    - by Activist
    I'm not that good with regular expressions... I need a JavaScript regular expression that will do the following: The string can contain letters (upper and lower case), but not punctuations such as éàïç... The string can contain numbers (0..9) anywhere in the string, except on the first position. The string can contain underscores (_). Valid strings: foo foo1 foo_bar fooBar Invalid strings: 1foo -- number as first character foo bar -- space föo -- punctuation ö Many thanks!

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >