I am looking for a simple tool that generates a catalog of all used action methods, values and bindings. I'm working on a big JSF/RichFaces project and I have lost the overview of the used links to the beans. Therefore I need a tool (would be nice if it is a Eclipse plugin) that generates a simple list of all used EL expressions.
Is the...
I have a string containing a local date/time and I need to convert it to a time_t value (in UTC) - I've been trying this:
char* date = "2009/09/01/00";
struct tm cal = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL};
strptime(date, "%Y/%m/%d/%H", &cal);
time_t t = mktime(&cal);
but the time_t value I get back is the value that I would expect if ...
Is it possible to create a class at runtime from a file without parsing it?
If not what would be the best approach to retrieve class properties, constructors and methods from a file? Taking into account that a file could have more than one class just like a typical cs file.
...
I'm new to this site, but it seems like someone out there should be able to answer my question.
I've recently started using jQuery, and spent the day slamming my head against the desk trying to successfully parse an XML file and append the text to a div. After failing at this in Safari, I switched over to Firefox, and found it working p...
Lets say I need to run some initialization code everytime I match a rule how can I reduce the redundancy?
rule : TOKEN1 { init(); token1Code(); }
| TOKEN2 { init(); token2Code(); }
;
Also is it possible to do something like
rule : TOKEN1
| TOKEN2
{ codeForToken1OrToken2(); }
;
...
I'm using pyparsing to parse HTML. I'm grabbing all embed tags, but in some cases there's an a tag directly following that I also want to grab if it's available.
example:
import pyparsing
target = pyparsing.makeHTMLTags("embed")[0]
target.setParseAction(pyparsing.withAttribute(src=pyparsing.withAttribute.ANY_VALUE))
target.ignore(pypar...
Hello,
I am struggling a bit with how I can unit test parsing a file... Let's say I have a file with 25 columns that could be anywhere from 20-1000 records long... How do I write a unit test against that? The function takes the file as a string as parameter and returns a DataTable with the file contents...
The best I can come up with i...
Before I dive into ANTLR (because it is apparently not for the faint of heart), I just want to make sure I have made the right decision regarding its usage.
I want to create a grammar that will parse in a text file with predefined tags so that I can populate values within my application. (The text file is generated by another applicati...
I have a new project I am working on that involves fetching a webpage, (using PHP and cURL) parsing the HTML and javascript out of it and then handling the data in the results.
Basically I hit a brick wall when the site uses javascript to fetch its data by AJAX. In this case, the initial data will not appear in the fetched page unless ...
hi every one i need to parse the following one such that it wil store each line in an array
avoiding emptyline asthere r two new lines after [2K
RTRV-ALM-EQPT::ALL:RA01;
[2K
SIMULATOR 09-11-20 13:52:15
M RA01 COMPLD
"SLOT-1-1-1,CMP:MN,T-FANCURRENT-1-HIGH,NSA,01-10-09,00-00-00,,:\"Fan-T\","
"SLOT-1-1-1,CMP:MJ,T-BATTERYPWR-2-L...
Using Python2.4.5 (don't ask!) I want to parse a query string and get a dict in return. Do I have to do it "manually" like follows?
>>> qs = 'first=1&second=4&third=3'
>>> d = dict([x.split("=") for x in qs.split("&")])
>>> d
{'second': '4', 'third': '3', 'first': '1'}
Didn't find any useful method in urlparse.
...
I have a string which I need to split into an array and then perform mathematical functions on each element of the array.
Currently I am doing something like this. (Actually, I am doing nothing like this, but this is a very simple example to explain my question!
var stringBits = theString.split('/');
var result = parseInt(stringBits[0...
I have an application where I've been using html5lib to liberally parse html. I use the minidom interface, because I need a real DOM API and ElementTree is not appropriate for what I'm doing.
Here's how I do this:
parser = html5lib.XHTMLParser(tree=html5lib.treebuilders.getTreeBuilder('dom'))
parser.parse(html)
However, parsing huge ...
I have an xml feed at this url
Now im trying parse the content, particularly the content in <REDIRECT></REDIRECT> tags.
I use the following code to try and parse the content but it isnt working and im not sure what im doing wrong.
$xml_file = $ADurl;
$xml_headline_key = "*XML*RESULTS*LISTING*REDIRECT";
$xml_description_key = "*XML*RES...
Why i'm getting this error
Using
org.apache.xerces.parsers.SAXParser
Exception
net.sf.saxon.trans.XPathException:
org.xml.sax.SAXParseException: The
element type "head" must be terminated
by the matching end-tag "".
org.xml.sax.SAXParseException: The
element type "head" must be terminated
by the matching end-tag ""...
Too many people have told me about the disadvantages, but what is its advantage if any?
...
I have program that needs to parse XML that contains character entities. The program itself doesn't need to have them resolved, and the list of them is large and will change, so I want to avoid explicit support for these entities if I can.
Here's a simple example:
<?xml version="1.0" encoding="UTF-8"?>
<xml>Hello there &something;</xm...
I've been playing with phpDocumentor recently and found it quite suitable for my needs. I'm largely working with PHP/HTML/JS/CSS codebases and would like phpDocumentor to parse my Javascript (and perhaps CSS) in order to keep it all together.
I've managed to get phpdoc to parse javascript files contained throughout the codebase - howeve...
I'm attempting to parse SQL using the TSql100Parser provided by microsoft. Right now I'm having a little trouble using it the way it seems to be intended to be used. Also, the lack of documentation doesn't help. (example: http://msdn.microsoft.com/en-us/library/microsoft.data.schema.scriptdom.sql.tsql100parser.aspx )
When I run a simple...
i want to store offset of diffn fields of pdf file..
what is good way to do this...
...