Search Results

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

Page 108/1413 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • echo XML values

    - by danit
    Here is my XML: object(SimpleXMLElement)#1 (2) { ["@attributes"]=> array(1) { ["type"]=> string(5) "array" } ["feed"]=> array(3) { [0]=> object(SimpleXMLElement)#2 (6) { ["title"]=> string(34) "Twitter / Favorites from bob" ["id"]=> string(27) "tag:twitter.com,2007:Status" ["link"]=> array(2) { [0]=> object(SimpleXMLElement)#5 (1) { ["@attributes"]=> array(3) { ["type"]=> string(9) "text/html" ["href"]=> string(38) "http://twitter.com/bob/favorites" ["rel"]=> string(9) "alternate" } } [1]=> object(SimpleXMLElement)#6 (1) { ["@attributes"]=> array(3) { ["type"]=> string(20) "application/atom+xml" ["href"]=> string(40) "http://twitter.com/favorites.atom?page=1" ["rel"]=> string(4) "self" } } } ["updated"]=> string(25) "2010-04-01T10:44:19+00:00" ["subtitle"]=> string(56) "Twitter updates favorited by Dan Humpherson / MoodleDan." ["entry"]=> array(20) { [0]=> object(SimpleXMLElement)#7 (7) { ["title"]=> string(104) "smashingmag: Sikuli: a visual technology to search and automate GUIs using images - http://bit.ly/6ArwzP" ["content"]=> string(104) "smashingmag: Sikuli: a visual technology to search and automate GUIs using images - http://bit.ly/6ArwzP" ["id"]=> string(72) "tag:twitter.com,2007:http://twitter.com/smashingmag/statuses/11389386545" ["published"]=> string(25) "2010-03-31T22:06:41+00:00" ["updated"]=> string(25) "2010-03-31T22:06:41+00:00" ["link"]=> array(2) { [0]=> object(SimpleXMLElement)#27 (1) { ["@attributes"]=> array(3) { ["type"]=> string(9) "text/html" ["href"]=> string(51) "http://twitter.com/smashingmag/statuses/11389386545" ["rel"]=> string(9) "alternate" } } [1]=> object(SimpleXMLElement)#28 (1) { ["@attributes"]=> array(3) { ["type"]=> string(10) "image/jpeg" ["href"]=> string(64) "http://a3.twimg.com/profile_images/572829723/original_normal.jpg" ["rel"]=> string(5) "image" } } } ["author"]=> object(SimpleXMLElement)#29 (2) { ["name"]=> string(17) "Smashing Magazine" ["uri"]=> string(31) "http://www.smashingmagazine.com" } } For the life of me I cannot get my code to work, all I want to do is echo the entry->content string but no matter what I try I get nothing. Can anyone assist an inept PHP n00b?

    Read the article

  • get particular string using regex in java

    - by hussain
    i want how to code for get only link from string using regex or anyothers. here the following is java code: String aas = "window.open("+"\""+"http://www.pageresource.com/jscript/jex5.htm"+"\""+")"+"\n"+"window.open("+"\""+"http://www.pageresource.com/jscript/jex5.htm"+"\""+")"; how to get the link http://www.example.com/jscript/jex5.htm thanks and advance

    Read the article

  • Perl - Encoding String for XML

    - by Sho Minamimoto
    I'm not too fluent with the perl XML libraries (actually, I really suck at understanding encoding in general), all I'm doing is taking a string that possibly has characters such as "à" and putting it in an XML file, but when I open the file, I get an encoding error at the line containing such a character. So I just need a lightweight way to take a string and encode it for XML.

    Read the article

  • Reading xml within xml as String in flex/AS3

    - by duder
    I'm getting XML input that looks like this <?xml version="1.0" encoding="utf-8"?> <data1>this is data 1</data1> <data2>this is data 2</data2> <data3> <3a>this is data 3a</3a> <3b>this is data 3b</3b> <3c> <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"> <p direction="ltr" > <span>some text</span> <span>some additional text</span> </p> <p direction="ltr"> <span>some text</span> <span>some additional text</span> </p> </TextFlow> </3c> </data3> I can read <data1> with event.result.data1 which outputs a string this is data1 But when I do the same thing to event.result.data3.3c, it prints object [object] so I guess it's trying to dig deeper into the tree. But I need the actual string text (not xml tree) starting from and including <TextFlow></TextFlow> to be stored and printed as a string. Any idea what's the syntax for this? The string I'm looking for would look like this: <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"> <p direction="ltr" > <span>some text</span> <span>some additional text</span> </p> <p direction="ltr"> <span>some text</span> <span>some additional text</span> </p> </TextFlow>

    Read the article

  • How to access a String that is in JSON array format

    - by Sayem Ahmed
    I have an asp.net page which is returning a list of object as a json string to an ajax request. The string is as follows : [ {"Name":"Don","Age":23,"Description":"Tall man with no glasses"} ,{"Name":"Charlie","Age":24,"Description":"Short man with glasses"} ] I want to access each field individually, like the name of the person, his age, his description etc. How can I do that? I am using JQuery for client-side scripting.

    Read the article

  • longest string in texts

    - by davit-datuashvili
    ok i have meet following problem too for example there is given two text find longest string that occur in both i think we should cretate string array where we should put common srings and then compare their length and which length will be largest print it is there fast method?

    Read the article

  • JavaScript query string

    - by Chris
    Is there any JavaScript library that makes a dictionary out of the query string, ASP.NET style? Something that would be used like: var query = window.location.querystring["query"]? Is a "query string" called something else outside the .NET realm? Why isn't location.search broken into a key/value collection already? EDIT: I have written my own function, thanks, but does any major JavaScript library do this?

    Read the article

  • convert bitset to string ??

    - by mr.bio
    Hi .. What is wrong with this code ? set<string> nk ; bitset<3> bs1(string("100")); nk.insert(bs1.to_string()); error: no matching function for call to `std::bitset<3u::to_string()' why?!

    Read the article

  • Custom string formatting in Grails JSON marshaller

    - by ethaler
    I am looking for a way to do some string formatting through Grails JSON conversion, similar to custom formatting dates, which I found in this post. Something like this: import grails.converters.JSON; class BootStrap { def init = { servletContext -> JSON.registerObjectMarshaller(String) { return it?.trim() } } def destroy = { } } I know custom formatting can be done on a per domain class basis, but I am looking for a more global solution.

    Read the article

  • How to cast a STRING to a GUID

    - by GIbboK
    Hi, I need cast a String to a Guid. I am using this code but string myUserIdContent = ((Label)row.FindControl("uxUserIdDisplayer")).Text; Guid myGuidUserId = new Guid(myUserIdContent); // PROBLEM HERE MembershipUser mySelectedUser = Membership.GetUser(myGuidUserId); I receive this error Exception Details: System.FormatException: Unrecognized Guid format. ANy other ways to do it? thanks

    Read the article

  • How to get a particular part of a String

    - by Harish
    I am writing a macro in Excel where I need to get a substring from a String. Its like this. ~/tester/test/hai/bye ~/stack/overflow/hai/bye In the above cases I need to take the String tester from the first one and stack from the second one.I tried using the Instr but its not useful.Can anyone help this?

    Read the article

  • Query JSON String

    - by Theofanis Pantelides
    Hi, Is there a way to query a JSON (String) for a specific item? ie: String jSon = "{\"a\":{\"b\":27472483,\"c\":\"123\"}}"; such that: Int32 bob = (Int32)getFromJSON("a.b", jSon); // bob == 27472483 Thank you, -Theo

    Read the article

  • Regex is capturing the whole string

    - by M28
    I am using the following regex: (public|private +)?function +([a-zA-Z_$][0-9a-zA-Z_$]*) *\\(([0-9a-zA-Z_$, ]*)\\) *{(.*)} To match the following string: public function messenger(text){ sendMsg(text); } private function sendMsg(text){ alert(text); } (There is no line breaks in the string, they are converted to whitespaces before the regex runs) I wanted it to capture both functions, but it is capturing: $1: "" $2: "messenger" $3: "text" $4: " sendMsg(text); } private function sendMsg(text){ alert(text); " By the way, I am using Javascript.

    Read the article

  • How to decode an encoded string?

    - by Madan Mohan
    While decoding,I am getting NSData bytes by decoding a string.I am converting NSData bytes as string then I am getting the following out put. -(void)decodeAction:(NSString*)str { NSData *data=[NSData base64DataFromString:str]; NSString *stt=[NSString stringWithFormat:@"%@",data]; printf("\n stt %s",[stt UTF8String]); } <4f7c204d 6c204d61 604d6164 61616461 6164616e 24616e20 4d6e204d 6e204d6f 604d6f68 616f6861 6f68616e 28616e

    Read the article

  • How to convert String to Java.sql.date and Java.sql.time

    - by Mr Morgan
    Hello If I have a method like this: public static String convertDateTimeToString(DateTime dt) { return dt.getDate() + " " + dt.getTime(); } Which takes a Datetime object of my own which contains a Java.sql.date and a Java.sql.time, what is the best way of reversing the process so that I can substring a Java.sql.date and a Java.sql.time from a string? Or if DateTime dt is a JodaTime DateTime object? If this can be done without reference to Java.util.date. Thanks Mr Morgan.

    Read the article

  • Force max length for string in PostgreSQL

    - by Jimmy
    Hey guys, I am using heroku for a RoR application and am trying to manually set the length of a string column and am having trouble. I tried making a migration along the lines of change_column :posts, :content, :string, :length => 10000 I assumed this would work but no such luck, anyone have some pointers? Thanks!

    Read the article

  • Exclude a string from wildcard search in a shell

    - by steigers
    Hello everybody I am trying to exclude a certain string from a file search. Suppose I have a list of files: file_Michael.txt, file_Thomas.txt, file_Anne.txt. I want to be able and write something like ls *<and not Thomas>.txt to give me file_Michael.txt and file_Anne.txt, but not file_Thomas.txt. The reverse is easy: ls *Thomas.txt Doing it with a single character is also easy: ls *[^s].txt But how to do it with a string? Sebastian

    Read the article

  • why string is a reference type?

    - by saurabh
    We know that string is a reference type , so we have string s="God is great!"; but on the same note if i declare class say Employee which is a reference type so why below piece of code does not work ? Employee e = "Saurabh"; 2- How do we actually determine if a type is a reference type or value type?

    Read the article

  • Using strchr to build a string

    - by Roel
    I have the following: LPSTR email // Has data in it already LPSTR index=strchr(email,'@'); Now I want to Insert into a new string: LPSTR username the part of "email" from the beginning of the string to "index". For example: email="[email protected]" so username="roel" . Is there a function to do it quick or do I need to build one? Roel

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >