Search Results

Search found 3176 results on 128 pages for 'parsing'.

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

  • Prevent backslash from being parsed by javascript for a string

    - by user286269
    A Flash AS3 IRC application sends me a string like "f\reak" to my javascript. Irc allows the \ in usernames which poses a problem when its passed to javascript. "f\reak" become "feak" in javascript making the \r into a carriage return. Is there a way to read the absolute value of the string instead of parsing a carriage return? These don't methods didn't work str.valueOf() str.toString() str.charAt(position of the \ ) this just sees the carriage return as well and not a backslash

    Read the article

  • Robust Javascript parser in Java

    - by Misha Koshelev
    Dear All: I am looking for a robust Javascript parser written in Java - by which I mean a Javascript parser that is able to handle most real world Javascript. I am only interested in parsing Javascript, not in executing it. I have found Rhino: http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_thread/thread/1eff23a8ee57b991 Am I missing anything? Is this the best solution? Thank you! Misha

    Read the article

  • Best XML Parser for RSS Feeds in Objective C ?

    - by Ansari
    Hi all, I am going to develop an application which will parse the RSS feeds and display the items in my custom cell.(Cell containing the image, label, description, etc). The most popular way of parsing is using the NSXMLParser. But this is bit of a lengthy way. So is there any other way to do this. Or my question will be, which is the best xml parser for objective-c ?

    Read the article

  • Problem using date when querying the appengine datastore

    - by manu1001
    I'm running this query: SELECT FROM com.Data WHERE entryDate DATE('2010-3-16') I get this error: org.datanucleus.store.appengine.query.DatastoreQuery$UnsupportedDatastoreFeatureException: Problem with query DATE('2010-3-16'): Unsupported method while parsing expression: InvokeExpression{[null].DATE(Literal{2010-3-16})} The same query works when I use it on the admin console. But it does not work for code (java), either locally or when deployed. Any ideas?

    Read the article

  • ASP.NET MVC IIS 7.5

    - by alinpopescu
    Hello, I have follwing erorr after I have published site in IIS 7.5 and i don't hnow what to do Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'ProiectLicenta.MvcApplication'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="ProiectLicenta.MvcApplication" Language="C#" %

    Read the article

  • How to build a function on the fly in java?

    - by stereos
    I'm parsing a text file that is being mapped to some java code like such: public void eval(Node arg) { if(arg.data.equals("rand")) { moveRandomly(); } else if(arg.data.equals("home")) { goHome(); }//snip.. This is going to need to be re-evaluated about a thousand times and I'd rather not have to traverse the whole thing every time. Is there any way to make this traversal once and then have it be a function that is called every other time?

    Read the article

  • C# DriveInfo FileInfo

    - by maxfridbe
    This may seem like a stupid question, so here goes: Other than parsing the string of FileInfo.FullPath for the drive letter to then use DriveInfo("c") etc to see if there is enough space to write this file. Is there a way to get the drive letter from FileInfo?

    Read the article

  • Can sphinx be used over cassandra?

    - by Mickey Shine
    I am planning to build a cassandra store system and also I need a full-text(Chinese) system too. Can sphinx be used on cassandra? (sphinx supports xml format but I am not going to use it, cause it is slow and much of time are spent on xml parsing). Or you can share your experiences if you have ever built a full-text searching system over cassandra. Thank you

    Read the article

  • Lua parser in python

    - by Joe Simpson
    Hi, I'm looking into using Lua in a web project. I can't seem to find any way of directly parsing in pure python and running Lua code in Python. Does anyone know how to do this? Joe

    Read the article

  • How do I detect unicode characters in a Java string to resolve sax parser exception

    - by Madhumita
    Suppose I have a string that contains '¿'. How would I find all those unicode characters? Should I test for their code? How would I do that? I want to detect it to avoid sax parser exception which I am getting it while parsing the xml saved as a clob in oracle 10g database. Exception javax.servlet.ServletException: org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.

    Read the article

  • Using NSXMLParser to parse Vimeo XML on iPhone.

    - by Sonny Fazio
    Hello, I'm working on an iPhone app that will use Vimeo Simple API to give me a listing our videos by a certain user, in a convenient TableView format. I'm new to Parsing XML and have tried TouchXML, TinyXML, and now NSXMLParser with no luck. Most tutorials on parsing XML are for a blog, and not for an API XML sheet. I've tried modifying the blog parsers to search for the specific tags, but it doesn't seem to work. Right now I'm working with NSXMLParser and it seems to correctly find the value of an XML tag, but when it goes to append it to a NSMutableString, it writes a whole bunch of nulls in between it. I'm using a tutorial from theappleblog and modifying it to work with Vimeo API - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ if ([currentElement isEqualToString:@"video_title"]) { NSLog(@"String: %@",string); [currentTitle appendString:string]; } else if ([currentElement isEqualToString:@"video_url"]) { [currentLink appendString:string]; } else if ([currentElement isEqualToString:@"video_description"]) { [currentSummary appendString:string]; } else if ([currentElement isEqualToString:@"date"]) { [currentDate appendString:string]; } Here is the nulls it writes: http://grab.by/grabs/92d9cfc2df4fac3fe6579493b1a8e89f.png Then when it finishes, it has to add the NSMutableStrings into a NSMutableDictionary - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{ //NSLog(@"found this element: %@", elementName); currentElement = [elementName copy]; if ([elementName isEqualToString:@"item"]) { // clear out our story item caches... item = [[NSMutableDictionary alloc] init]; currentTitle = [[NSMutableString alloc] init]; currentDate = [[NSMutableString alloc] init]; currentSummary = [[NSMutableString alloc] init]; currentLink = [[NSMutableString alloc] init]; } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{ NSLog(@"Title: %@",currentTitle); if ([elementName isEqualToString:@"item"]) {// save values to an item, then store that item into the array... [item setObject:currentTitle forKey:@"video_title"]; NSLog(@"Current Title%@", currentTitle); [item setObject:currentLink forKey:@"video_url"]; [item setObject:currentSummary forKey:@"video_description"]; [item setObject:currentDate forKey:@"date"]; [stories addObject:[item copy]]; NSLog(@"adding story: %@", currentTitle); } } I would really appreciate it if someone has any advance

    Read the article

  • How divide a string into array

    - by Ricky
    If I have the following plain string, how do I divide it into an array of three elements? {["a","English"],["b","US"],["c","Chinese"]} ["a","English"],["b","US"],["c","Chinese"] This problem is related to JSON string parsing, so I wonder if there is any API to facilitate the conversion.

    Read the article

  • How to detect which Space the user is on in Mac OS X Leopard?

    - by georgebrock
    Mac OS X Leopard has a virtual desktop implementation called Spaces. I want to programatically detect which space the user is currently on. Cocoa is preferable but AppleScript is acceptable if there's no other way. I've seen a couple of AppleScript implementations, but the techniques they used seemed a bit too hacky to use in production code (one relied on causing and error and then parsing the error message to get the current space, the other interrogated the Spaces menu GUI)

    Read the article

  • php functions new php developers should be aware of

    - by John
    Can people suggest a list of common or popular php functions that new/junior programmers should be aware of so that they don't "re-invent-the-wheel" so to speak? For example, I've seen a lot of new coders try to write their own date parsing functions when a combination of date(), strtotime() and time() can do everything their looking for. Any other ones you guys want to add to this list? Thanks

    Read the article

  • NSMutableArray of NSString in CoreData(iPhone

    - by azia
    I have a class, which describe an object for parsing XML. This class contains NSStrings and NSMutableArrays of NSStrings.I want to store parsed data using CoreData. How should I write CoreData model to store such objects if there is no such data type like NSMutableArray? Is there any way?

    Read the article

  • jQuery and margin: 0 auto

    - by Trevor Burnham
    So, this is a problem that's been asked before, but I'm hoping we can lay it to rest: I'm using jQuery 1.4. If I define the style #obj { margin: 0 auto; } and then do $('#obj').css('marginLeft'); the result is the computed value in pixels. Is there any way to tell whether those pixels come from the auto calculation or not, without parsing document.styleSheets?

    Read the article

  • REST/JSON: Should I include a newline after the JSON string?

    - by Mark Harrison
    If I'm returning ["foo"] from a RESTful web query, Which of these is more proper? Will pedantic REST parsing die on the newline? ["foo"]\n (with newline, Content-Length=8) ["foo"] (no newline, Content-Length=7) For easy regression testing I like the form with the newline, but I want to make sure I won't be breaking any application frameworks that might have a more strict view of the REST format.

    Read the article

  • Headers on the second row in FasterCSV?

    - by Schroedinger
    G'day guys, I'm currently using fasterCSV to parse a CSV file in ruby, and wondering how to get rid of the initial row of data on a CSV (The initial row contains the time/date information generated by another software package) I tried using fasterCSV.table and then deleting row(0) then converting it to a CSV document then parsing it but the row was still present in the document. Any other ideas? fTable = FasterCSV.table("sto.csv", :headers => true) fTable.delete(0)

    Read the article

  • Passing in **kwargs from Flex over PyAMF

    - by cookiecaper
    Anyone know if it is easily possible to send **kwargs over PyAMF from NetConnection.call()? I would like it. I could write a wrapper around the actual function and expose that and perform some parsing manually to determine the kwargs to pass in, but I don't want to do that. I will just use a normal argument list in that case.

    Read the article

  • Scala xhtml attribute breaks because of a question mark

    - by portoalet
    I had a problem with <iframe id="iframe1" src='http://stockcharts.com/h-sc/ui?s=MT&p=D&yr=2&mn=0&dy=0&id=p43321191731' width="300px" height="300px"></iframe> in Lift web framework (Scala) version Message: java.util.NoSuchElementException scala.RandomAccessSeq$$anon$13.next(RandomAccessSeq.scala:165) scala.xml.parsing.MarkupParser$class.normalizeAttributeValue(MarkupParser.scala:1191) It turned out the question mark ? in the iframe src attribute caused this. What can I do to fix this quickly?

    Read the article

  • Question about DBD::CSB Statement-Functions

    - by sid_com
    From the SQL::Statement::Functions documentation: Function syntax When using SQL::Statement/SQL::Parser directly to parse SQL, functions (either built-in or user-defined) may occur anywhere in a SQL statement that values, column names, table names, or predicates may occur. When using the modules through a DBD or in any other context in which the SQL is both parsed and executed, functions can occur in the same places except that they can not occur in the column selection clause of a SELECT statement that contains a FROM clause. # valid for both parsing and executing SELECT MyFunc(args); SELECT * FROM MyFunc(args); SELECT * FROM x WHERE MyFuncs(args); SELECT * FROM x WHERE y < MyFuncs(args); # valid only for parsing (won't work from a DBD) SELECT MyFunc(args) FROM x WHERE y; Reading this I would expect that the first SELECT-statement of my example shouldn't work and the second should but it is quite the contrary. #!/usr/bin/env perl use warnings; use strict; use 5.010; use DBI; open my $fh, '>', 'test.csv' or die $!; say $fh "id,name"; say $fh "1,Brown"; say $fh "2,Smith"; say $fh "7,Smith"; say $fh "8,Green"; close $fh; my $dbh = DBI->connect ( 'dbi:CSV:', undef, undef, { RaiseError => 1, f_ext => '.csv', }); my $table = 'test'; say "\nSELECT 1"; my $sth = $dbh->prepare ( "SELECT MAX( id ) FROM $table WHERE name LIKE 'Smith'" ); $sth->execute (); $sth->dump_results(); say "\nSELECT 2"; $sth = $dbh->prepare ( "SELECT * FROM $table WHERE id = MAX( id )" ); $sth->execute (); $sth->dump_results(); outputs: SELECT 1 '7' 1 rows SELECT 2 Unknown function 'MAX' at /usr/lib/perl5/site_perl/5.10.0/SQL/Parser.pm line 2893. DBD::CSV::db prepare failed: Unknown function 'MAX' at /usr/lib/perl5/site_perl/5.10.0/SQL/Parser.pm line 2894. [for Statement "SELECT * FROM test WHERE id = MAX( id )"] at ./so_3.pl line 30. DBD::CSV::db prepare failed: Unknown function 'MAX' at /usr/lib/perl5/site_perl/5.10.0/SQL/Parser.pm line 2894. [for Statement "SELECT * FROM test WHERE id = MAX( id )"] at ./so_3.pl line 30. Could someone explaine me this behavior?

    Read the article

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