We're evaluating using Silverlight on C++ for an embedded project and are prototyping some screens for a demonstration.
What I'm finding is that Expression Blend will create XAML files that work fine on the desktop but, when porting them over to the CE device results in parse errors (apparently not all tags and elements are supported on...
It's been a few years since I've had to parse any files which were harder than CSV or XML so I am out of practice. I've been given the task of parsing a file format called NeXus in a Delphi application.
The problem is I just don't know where to start, do I use a tokenizer, regex, etc? Maybe even a tutorial might be what I need at this...
I lost a lot of time on this one, so I'm posting the question and answering from what I learned, as a resource to help other people out. The context of the problem is building an RSS reader. While RSS dates are supposed to conform to RFC822, they do so in differing ways so you want a method that's flexible. I tried to use GWT DateTime...
I'm trying to get a text field that my users can enter in something that is parsable by the Chronic gem. Here is my model file:
require 'chronic'
class Event < ActiveRecord::Base
belongs_to :user
validates_presence_of :e_time
before_validation :parse_date
def parse_date
self.e_time = Chronic.parse(self.e_time_before_type_...
Currently, I'm not using following any xml parameter following url, But i getting error
http://odpdl.yuuzoo.com/yuudedicate_purchase_api.aspx?ln=AR&store_code=yuudedicate_lb_web&password=karam&username=camil&keyword=41205&date=2010-07-23&time=5:20PM&destination=03491080
...
I am coding a survey that outputs a .csv file. Within this csv I have some entries that are space delimited, which represent multi-select questions (e.g. questions with more than one response). In the end I want to parse these space delimited entries into their own columns and create headers for them so i know where they came from.
F...
I have to parse a file and store it in a table. I was asked to use a hash to implement this. Give me simple means to do that, only in Perl.
-----------------------------------------------------------------------
L1234| Archana20 | 2010-02-12 17:41:01 -0700 (Mon, 19 Apr 2010) | 1 line
PD:21534 / lserve<->Progress good
-------------------...
Hey guys,
has any of you some experience with parsing HTML with the TouchXML lib on the iPhone. I would like to parse some html and therefore try to do the following
self.parser = [[CXMLDocument alloc]initWithData:self.html options:0 error:&error1];
if (error1) {
NSLog(@"Error: %d", error1);
}
NSError *error;
NSArray *resultNod...
I'm trying to do some very basic C++ function declaration parsing. Here is my rule for parsing an input parameter:
arg : 'const'? 'unsigned'? t=STRING m=TYPEMOD? n=STRING
-> ^(ARG $n $t $m?) ;
STRING : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'::')+ ;
TYPEMOD
: ('*' | '&')+ ;
The problem is I'm trying to pass it something like:
int *pa...
Guys, I'm looking for some c# sample code or a tool that could parse .vdproj file (Visual 2010 Studio Setup and Deployment Project).
Please, help me.
...
I current have the following XML fragment that I'm parsing to read its values and display them on a web page:
<root>
<PostcardTitle>The Needles</PostcardTitle>
<PostcardDescr>Granite Dells, Prescott</PostcardDescr>
<PostcardImage>
<img alt="GraniteDells" src="GraniteDells.jpg" />
</PostcardImage>
<PostcardDate />
<Postca...
I have this sample string:
Sample string 1:
A^1.1#B^1#I^2#f^0#p^1#d^2010-07-21T08:52:05.222ZKHBDGSLKHFBDSLKFGNIF#%$%^$#^$XLGCREWIGMEWCERG
Sample string 2:
A^1.1#B^1#f^0#p^1#d^2010-07-22T07:02:05.370ZREGHCOIMIYR$#^$#^$#^EWMGCOINNNNNNVVVRFGGYVJ667VTG
So, from these strings, I need to take out the time stamp:
2010-07-21T08:52:05.222 or...
In a previous question I asked about reading in an XML file into R and carry out basic statistical analysis such as finding the mean and the standard deviation etc. This question is about the reverse of the reading of the original XML file and creating a new XML file that contains the original data and the results from the statistical a...
I'm running into memory issues with PHP Simple HTML DOM Parser. I'm parsing a fair sized doc and need to run down the DOM tree...
1)I'm starting with the whole file:
$html = file_get_html($file);
2)then parsing out my table:
$table = $html->find('table.big');
3)then parsing out my rows:
$rows = $table[0]->find('tr');
What I'm...
Hi all,
I have an xml file as follows:
<products>
<foundation label="New Construction">
<series label="Portrait Series" startImg="img/blank.png">
<item_container nr="1" label="Firebed">
<item next="11" id="" label="Logs Black Brick">img/PortraitSeries/logs-black-brick.png</item>
...
I am writing the C# function which retrieves some files matched pattern.
Input : C:\abc*\abc?\testfile.*
Output : All files matched.
I thought I could make it by recursion. But it was not easy :(
Do you have a nice algorithm?
Update:
I made it. Thanks Kieren :)
void PrintAllFiles(DirectoryInfo currentDir,
string...
Sorry if my question is a little repetitive, but I did not find an answer for my question so I post it here.
So, here is this URL which I use to generate a security-token:
api.sandbox.inrix.com/Traffic/Inrix.ashx?Action=GetSecurityToken&vendorId=1043016094&consumerId=94ce0781-b32f-4da5-b80b-8ca00cfb2194
The response of typing the abov...
Hi there,
I've created a static getter-function:
@implementation MyClass
static int aValue = 1;
+ (int) aValue { return aValue; }
// other stuff here
@end
and now I'm trying to access it in some different ways from another class:
@implementation AnotherClass
- (void) aMethod {
if (MyClass.aValue > 0) { NSLog(@"Foobar"); } //...
I'm parsing third party log files containing date/time using Joda. The date/time is in one of two different formats, depending on the age of the log files I'm parsing.
Currently I have code like this:
try {
return DateTimeFormat.forPattern("yyyy/MM/dd HH:mm:ss").parseDateTime(datePart);
} catch (IllegalArgumentException e) {
re...
Hay, i'm trying to parse an RSS feed from a wordpress blog. So far everything is working as expected, here's my code
<?php
$feedUrl = "FEED URL";
$rawFeed = file_get_contents($feedUrl);
$xml = new SimpleXmlElement($rawFeed);
$channel = $xml->channel;
$items = $channel->item;
foreach($items as $item){
ec...