Search Results

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

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

  • What does "str indices must be integers" mean?

    - by digitala
    I'm working with dicts in jython which are created from importing/parsing JSON. Working with certain sections I see the following message: TypeError: str indices must be integers This occurs when I do something like: if jsondata['foo']['bar'].lower() = 'baz': ... Where jsondata looks like: {'foo': {'bar':'baz'} } What does this mean, and how do I fix it?

    Read the article

  • valid children of XmlNode according to DTD?

    - by redoced
    consider this: I'm inside a (selfbuilt) XML Editor and am about to add a Child to an XmlNode. How do I know which types of children are valid according to a DTD. it's a behaviour like Intellisense. I couldn't find any .NET classes for "parsing" the DTD. How would i go about this?

    Read the article

  • Drill down rss reader iphone

    - by bing
    Hi everyone, I have made a simple rss reader. The app loads an xml atom file in an array. Now I have added categories to my atom feed, which are first loaded in the array What is the best way to add drill down functionality programmatically. Now only the categories are loaded into the array and displayed. This is the implementation code ..... loading xml file <snip> ..... - (void)parserDidStartDocument:(NSXMLParser *)parser { NSLog(@"found file and started parsing"); } - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError { NSString * errorString = [NSString stringWithFormat:@"Unable to download story feed from web site (Error code %i )", [parseError code]]; NSLog(@"error parsing XML: %@", errorString); UIAlertView * errorAlert = [[UIAlertView alloc] initWithTitle:@"Error loading content" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [errorAlert show]; } - (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:@"entry"]) { // clear out our story item caches... Categoryentry = [[NSMutableDictionary alloc] init]; currentID = [[NSMutableString alloc] init]; currentTitle = [[NSMutableString alloc] init]; currentSummary = [[NSMutableString alloc] init]; currentContent = [[NSMutableString alloc] init]; } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{ //NSLog(@"ended element: %@", elementName); if ([elementName isEqualToString:@"entry"]) { // save values to an entry, then store that item into the array... [Categoryentry setObject:currentTitle forKey:@"title"]; [Categoryentry setObject:currentID forKey:@"id"]; [Categoryentry setObject:currentSummary forKey:@"summary"]; [Categoryentry setObject:currentContent forKey:@"content"]; [categories addObject:[Categoryentry copy]]; NSLog(@"adding category: %@", currentTitle); } } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ //NSLog(@"found characters: %@", string); // save the characters for the current item... if ([currentElement isEqualToString:@"title"]) { [currentTitle appendString:string]; } else if ([currentElement isEqualToString:@"id"]) { [currentID appendString:string]; } else if ([currentElement isEqualToString:@"summary"]) { [currentSummary appendString:string]; } else if ([currentElement isEqualToString:@"content"]) { [currentContent appendString:string]; } } - (void)parserDidEndDocument:(NSXMLParser *)parser { [activityIndicator stopAnimating]; [activityIndicator removeFromSuperview]; NSLog(@"all done!"); NSLog(@"categories array has %d entries", [categories count]); [newsTable reloadData]; }

    Read the article

  • UNIX script to parse Zone file (is this the best code?)

    - by Steve
    Hi, FOund the following on: http://mike.murraynet.net/2009/08/23/parsing-the-verisign-zone-file-with-os-x/ Can unix-masters have a look at it and see if its the best possible way to gather the unique domainsnames in a zone file? For .NET domains: grep “^[a-zA-Z0-9-]+ NS .” net.zone|sed “s/NS .//”|uniq netdomains.txt For .COM domains: grep “^[a-zA-Z0-9-]+ NS .” com.zone|sed “s/NS .//”|uniq comdomains.txt For .EDU domains: grep “^[a-zA-Z0-9-]+ NS .” edu.zone|sed “s/NS .//”|uniq edudomains.txt

    Read the article

  • Convert Int List Into Integer

    - by Kezzer
    This is a bit of an odd case I must admit, but I'm trying to find a succinct and elegant way of converting a List<int> into an actual int. For example, if my list contained entries 1, 2, and 3, then the final integer would be 123. The only other way I thought of doing it was converting the array to a string and then parsing the string. Any hints?

    Read the article

  • Disqus: change captions after success with jQuery

    - by andufo
    Hi, Disqus automatically places defined captions upon request. For example: Add new Comment I've tried to change its value with jquery on ready(): $('#dsq-new-post h3').text('Paticipa con tu cuenta favorita'); No success :( ... how can i know when disqus script is finished parsing the data so i can change the caption value of h3?

    Read the article

  • Website Listing Commonly Used Ruby Gems, Including Alternatives

    - by ottobar
    I know that I've seen this site before, but cannot remember it for the life of me. Basically, it is a listing of commonly used gems, like XML parsing or ORM libraries. For the ORM case, it lists ActiveRecord, DataMapper, and the like, stating the advantages and disadvantages of each. Does anyone know what this site is? I've googled and have not been able to find it.

    Read the article

  • How can I detect if an iPhone OS device has a proximity sensor?

    - by Batgar
    The docs related to proximity sensing state that if the proximity sensing APIs are used on a device without a proximity sensor (i.e. iPod touch, iPad) they will just return as if the proximity sensor has fired. Aside from checking the [[UIDevice currentDevice].model] string and parsing for "iPhone", "iPod touch", or "iPad" is there a slicker way to determine if a proximity sensor is on a given device?

    Read the article

  • ASP.NET site errors output nothing on the page.

    - by d1k_is
    OK, i have been doing some work modding a pre-compiled ASP.NET application (VB codebehind) but i have come across something i have never seen before. When ever theres an error on the loading of a page, the page outputs nothing (no error message, no error message, nothing at all) firefox displays this error: XML Parsing Error: no element found Location: http://site.local/Checkout.aspx Line Number 1, Column 1: Because there is no html output. Is there some sort of setting that im missing that makes IIS/ASP.NET function like this?

    Read the article

  • How to access xmlParserCtxt structure from within xmlSAXHandler callbacks?

    - by Lux In Tenebris
    I'm parsing (X)HTML pages content with libxml using the following call: htmlDocPtr doc = htmlSAXParseDoc(content, NULL, &html_handler, NULL); But for debugging purposes I need to analyze some of the current node properties in the start/end element callbacks. I know that the fourth argument of htmlSAXParseDoc can be used to pass any user defined data to the callbacks, but I don't have a pointer to xmlParserCtxt.

    Read the article

  • How can I make xmlpp::DomParser less verbose on errors?

    - by Beau Simensen
    How can I make xmlpp::DomParser be less verbose on errors? Right now, if parsing fails, I get a bunch of text printed to my console and I'd just as soon have that not be visible. Entity: line 1: parser error : Opening and ending tag mismatch: feed line 1 and fed <feed><entry id='5' /></fed> I don't see a lot of options for xmlpp::DomParser but I have to believe this is something that can be disabled/tweaked.

    Read the article

  • How to Filter ADO.NET data using a Full Text Seach (FTS) field?

    - by ActionFactory
    Hi All, We are using ADO.NET dataservices & are building URL based filters. Example: /Customers?filter=City eq 'London' We now need to filter on a Full Text 'tags' Field. WAS HOPING FOR: /Customers?filter=Tag like 'Friendly' PROBLEM: ADO.NET does not have a LIKE operator. ADO.NET does not seem to like FTS (It is not finding a match - because it is not parsing through the CSV's) Any ideas how to make this work? THX

    Read the article

  • I am faceing problem with this error of struts application.

    - by Sanjeev
    I am using My-eclipse and doing a struts project there is no syntax error but on starting tomcat server the following error appear in console. java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory and javax.servlet.UnavailableException: Parsing error processing resource path jndi:/localhost/strutspro/WEB-INF/struts-config.xml any idea whats the problem.

    Read the article

  • Getting pattern string from java SimpleDateFormat

    - by D Lawson
    I have a SimpleDateFormat object that I retrieve from some internationalization utilities. Parsing dates is all fine and good, but I would like to be able show a formatting hint to my users like "MM/dd/yyyy". Is there a way to get the formatting pattern from a SimpleDateFormat object?

    Read the article

  • dynamic xpath expression

    - by Ferol
    Good day, colleagues! Tell me please, how to make a dynamic xpath-parsing: for example, instead of writing $domXPath-query('//[(@id = "article-id-18")]'); - write something like that $domXPath-query('//[(@id = "article-id-*")]');, because in my case, the site's script generate (every time) a new id for block, that contains article's text? So question, is above.

    Read the article

  • returning JSON response to a ajax call prompts file download containing the response

    - by user200018
    i am submitting a from using jQuery ajax, and server is returning json response. but instead of the script, parsing the json result, the browser is prompting me to download the json response. I have had this problem before, where i forgot to return false at the end of the event handler. But this time im clueless why this is happening. anyone has experienced this problem.. thanks

    Read the article

  • Retrieve remote XML data with PHP

    - by rrrfusco
    I'm currently reading a regularly updated XML file with PHP (simpleXML). I'd like to reduce calls to the remote server by reading a cache file on my web server, then after some time, retrieving a new copy of the remote file. Is this an accepted practice for reading remote XML files, then parsing? Can anyone offer some suggestions on how to go about this in PHP, or perhaps there are some PEAR classes that deal with this?

    Read the article

  • How to program simple chat bot AI?

    - by Larsenal
    I want to build a bot that asks someone a few simple questions and branches based on the answer. I realize parsing meaning from the human responses will be challenging, but how do you setup the program to deal with the "state" of the conversation? EDIT: It will be a one-to-one conversation between a human and the bot.

    Read the article

  • URL Controller Mapping Strategies (PHP)

    - by sunwukung
    This is kind of an academic question, so feel free to exit now. I've had a dig through Stack for threads pertaining to URL/Controller mapping in MVC frameworks - in particular this one: http://stackoverflow.com/questions/125677/php-application-url-routing So far, I can ascertain two practices: 1: dynamic mapping through parsing the URL string (exploded on '/') 2: pattern matching matching url to config file containing available routes I wanted to get some feedback (or links to some other threads/articles) from folks regarding their views on how best to approach this task.

    Read the article

  • Directory.GetFiles returning entire path, I only want the filename?

    - by blerh
    This is the code I have set up to scan a directory of files: Dim fileArray() As String fileArray = Directory.GetFiles(System.AppDomain.CurrentDomain.BaseDirectory & "help\") And it successfully gets all files in the directory, but it gets their absolute paths aswell. For example, one of the entries in fileArray() is: F:\Project\Project\bin\x86\Debug\help\book_troubleshoot.html And I want it to just be: book_troubleshoot.html Is there a way to do this without parsing through all the array entries to trim off the path? Thanks.

    Read the article

  • Parser for C#

    - by madgnome
    Which parsers are available for parsing C# code? I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code.

    Read the article

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