reading a json object in jsp
i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object. so that i can print the values in the same jsp. ...
i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object. so that i can print the values in the same jsp. ...
I have a rails application which processes incoming emails via IMAP. Currently a method is used that searches the parts of a TMail object for a given content_type: def self.search_parts_for_content_type(parts, content_type = 'text/html') parts.each do |part| if part.content_type == content_type return part.body e...
Are there any YAML parsers or YAML Serialization libs in Delphi? ...
Hi, I'm trying to find a library that can read a given RSS/Atom feed, and that can guess its format and abstract it as a list of items. The idea is to build a simple RSS reader that could take any feed. I know PHP has a few libraries doing just that, but I can't find any .Net version. ...
When I parse HTML I wish to obtain only the innermost tags for the entire document. My intention is to semantically parse data from the HTML doc. So if I have some html like this <html> <table> <tr><td>X</td></tr> <tr><td>Y</td></tr> </table> </html> I want <td>X</td> and <td>Y</td> alone. Is this poss...
I've been parsing Excel documents in Perl successfully with Spreadhsheet::ParseExcel (as recommended in http://stackoverflow.com/questions/429193), but I can't figure out how to extract cell comments. Any ideas? A solution in Perl or Ruby would be ideal. ...
I'm trying to create a logic expression parser for expressions like: ((VariableA -> VariableB) AND NOT VariableC) The parser should be able to return, wheather the result is true or false for given values of variables. Basicly the expressions will only contain variables, logical operators (or, and, implication, equivalence, negation a...
I need a parser for a language that isn't all that complicated. The only catch is, I never want the parser to raise an error when it receives malformed input. Rather, I want it to just continue, making as much sense of the input as it can, similar to what the HTML parsers in a web browser do. I naturally thought to use a parser generato...
I have a set of mail logs: mail.log mail.log.0 mail.log.1.gz mail.log.2.gz each of these files contain chronologically sorted lines that begin with timestamps like: May 3 13:21:12 ... How can I easily grab every log entry after a certain date/time and before another date/time using bash (and related command line tools) without compar...
i have a JSON object sent from the browser to the jsp page. how do i receive that object and process it in jsp. do i need any specific parsers? i have used the following piece of code. but it wouldnt work. essentially i should read the contents of the object and print them in the jsp. <%@page language="java" import="jso.JSONObject"%> ...
Hi - I have a list of tuples of format [(String,String)] and I need a function to write the contents of the list to a text file, then another function to read this text file in as the same list of tuples. Here's what I've got for the saving function: save :: Table -> IO() save [] = writeFile "database.txt" "" save zs = do { writeFile "d...
Hi, I'm trying to make a constructor for a graph class that accepts a string as a parameter and uses it to build the graph. The string is formatted as follows: |vertex list|Edges list| e.g. |1,2,3,4,15|(1->2),(3->2),(4->15)| The idea is that the constructor will take the values from the string and then know to perform the following a...
Here's my problem (for en-US): Decimal.Parse("1,2,3,4") returns 1234, instead of throwing an InvalidFormatException. Most Windows applications (Excel en-US) do not drop the thousand separators and do not consider that value a decimal number. The same issue happens for other languages (although with different characters). Are there any...
I have as input blocks of text with commands and arguments, one per line, such as XYZ ARG1,ARG2,ARG3,...,ARGN And I want to verify that the arguments to XYZ are well formed for that particular command and execute the correct block of code if they are. There are something like ~100 commands, some of which have variable numbers of argum...
I'd need to know how to parse a query to know if it is well build before executing it. If the parsing is correct then execute it, if not discard it. I haven't been able to accomplish this using SET NOEXEC, SET PARSEONLY, TRY/CATCH. I m using dynamic sql inside a loop. Sometimes the dynamic sql is incorrect not for my fault but for the ...
It doesn't get much easier than using getopt() to parse command line parameters in C/C++. Is there anything similar for Delphi? Or ideally, with the same syntax? I know Delphi supports FindCmdLineSwitch and ParamStr(), but those still require some additional parsing. I want something that works like getopt() in C. Something that easily...
I've got a situation where I'm using an XML parser to extract data from a php://input. The data being sent in looks like:- <this>foo</this> <that>bar></that> <data><dong>zebras</dong><fong>monkeys</fong></data> Now, the issue is that because the handler:- $xml_parser = xml_parser_create(); xml_parser_set_option($xml_parser...
I'm using this grammar to calculate math expressions: // Konfiguration (JavaCC-Manual konsultieren) options { STATIC = true; // alle Parser-operationen sind static // verwende zwei Token um zu entscheiden, was passieren soll LOOKAHEAD = 2; } // hier beginnt unsere Parser Klasse ("MathParse") PARSER_BEGIN(MathParse) // h...
In regards to: http://stackoverflow.com/questions/720113/find-hyperlinks-in-text-using-python-twitter-related How can I extract just the url so I can put it into a list/array? Edit Let me clarify, I don't want to parse the URL into pieces. I want to extract the URL from the text of the string to put it into an array. Thanks! ...
Anyone know of an HTML parser for VB.NET or C#? I know .NET has a lot of XML support, like XMLReader and XMLWriter. Is there an HTMLWriter or HTMLReader? Ultimately what I'd like is a library that will parser an HTML file and raise events based on the tags it finds. Anyone know of a library to do this? ...