A Web service basically is a collection of open protocols -- XML, SOAP and WSDL -- that is used to exchange data between applications in a platform-independent way.
Part 1 of 3 in a series of articles about generating SQL from an XML file format. This part describes the background to the project and talks about the development of the file format and an XSD schema.
I have an ant build script that needs to pull files down from a web server. I can use the "get" task to pull these files down one by one. However, I'd like to be able to get a list of these files first and then iterate over the list with "get" to download the files. The webserver will report the list of files in json format, but I'm not sure how to parse json with ant.
Are there any ant plugins that allow for json parsing?
How does the XAML Parser convert the string "Red" in Foreground="Red" to a SolidColorBrush? Allthough I know the Types have System.ComponentModel.TypeConverter defined, I doupt that the WPF XAML parser acutally always uses those to convert the string to the brush. Are there any XAML APIs apart from XamlReader.Load (wich wants a valid xml string) that I could use to parse a single string as if it where an attibute for a certain property?
Hello,
I use a library to parse an iCalendar file, but I don't understand the regex to split property.
iCalendar property has 3 different style:
BEGIN:VEVENT
DTSTART;VALUE=DATE:20080402
RRULE:FREQ=YEARLY;WKST=MO
The library uses this regex that I would like to understand:
var matches:Array = data.match(/(.+?)(;(.*?)=(.*?)((,(.*?)=(.*?))*?))?:(.*)$/);
p.name = matches[1];
p.value = matches[9];
p.paramString = matches[2];
Thanks.
I have a simple string which is delimited by some character, let's say a comma. I should be able to create a TStringList and set it's delimiter to a comma then set the DelimitedText to the text I want to parse and it should be automaticlly parsed.
The problem is when I look at the output it also includes spaces as delimiters and chops up my results. How can I avoid this, or is there a better way to do this.
The SimpleDateFormat:
SimpleDateFormat pdf = new SimpleDateFormat("MM dd yyyy hh:mm:ss:SSSaa");
The exception thrown by pdf.parse("Mar 30 2010 5:27:40:140PM");:
java.text.ParseException: Unparseable date: "Mar 30 2010 5:27:40:140PM"
Any ideas?
i use ajax.beginform with EnableClientValidation. problem -the form sends data to controller in any case even the form is not correct -what the proiblem?
the second qusion- i return ajax data like this
return Json(new { value = "msg" });
how can i parse this data from javascript on view?
Unix configuration files come in all shapes and forms. I know that Webmin has a Perl API that makes it easy to parse and modify most common configuration pro grammatically, while preserving changes that might have been made by hand.
Are there any other libraries that has similar functionality, perhaps for other languages (Python, Ruby, C, C++, etc)?
How i can parse and extract the parameters from an SQL Query using delphi?
example :
from this query
SELECT * FROM MyTable
WHERE Field1=:Param1
AND Field2=:Param2
AND (Field3=:Param3 OR Field4=:Param4)
i want to obtain
Param1
Param2
Param3
Param4
Thanks in advance.
I'm trying to parse BBcodes in php but i don't think my code is safe at all.
$Text = preg_replace("(\[color=(.+?)\](.+?)\[\/color\])is","<span style=\"color: $1\">$2</span>",$Text);
I think you can pass an injection like this and it will work:
[color=<script>alert('gotcha');</script>]
How to improve my regex to only capture the two standar color formats:
[color=red] OR [color=#FF0000]
Thanks
is there a way to parse OpenCalais RDF in .NET as i'm using dotnetRDF and it keeps giving me errors. A sample of the Rdf generated may be found in http://viewer.opencalais.com/ , i'm honestly really lost and would really appreciate any help! please help if you use any other apis or know how to make it work with dotnetRDF as i'm honestly really really lost
Erika
I'm trying to get a remote RSS through proxy and parse it.
I'm using magpierss, but it doesn't allow reaching internet through a proxy (or I don't know how to do it).
I assume the option is to, first, fetch the rss with curl functions, that allows proxy authenticating, but ....
are there any class to do this in a easy way, or ... does magpie support using proxy, and how?
Thanks in advance.
This is probably a nub question, but I don't understand why this works:
<script type="text/javascript">
alert(foo);
function foo() { }
</script>
This alerts "function foo() { }", but I expected the alert to be evaluated before the function foo was defined. Can someone explain what I don't understand about parse/evaluation order or point me to a resource that does?
Thanks in advance,
-- Breck
I'm looking for a regex that will parse a line at a time from a csv file. basically, what string.readline() does, but it will allow line breaks if they are within double quotes.
or is there an easier way to do this?
Im working on a script to run through a CSV file (see previous post)
I ran into a weird thing, where if my actual CSV file itself has a blank line at the end of it, it will open and parse just fine, but if it doesn't, if the end of the file ends at the end of the last line, it just shows up blank.
Hello!
I have list of IPs:
238.51.208.96/28
238.51.209.180-199
238.51.209.100-109
238.51.213.2-254
...
How can I easily parse them? I need first and last IP from range.
For First line I can use Net::Netmask CPAN module, but what can I do with others lines?
I have the following JSON text that i need to parse to get pageName, pagePic, post_id, etc.
What is the required code?
{
pageInfo: {
pageName: abc
pagePic: http://profile.ak.fbcdn.net/object2/367/65/q160119538822_4127.jpg
}
posts: [
{
post_id: 160119538822_302076968822
actor_id: 1183856639
picOfPersonWhoPosted: http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs302.ash1/23104_1183856639_4894_q.jpg
nameOfPersonWhoPosted: Andrea Raquel
message: Sounds cool. Can't wait to see it!
likesCount: 2
comments: [
]
timeOfPost: 1266036226
}
What is the best way to parse a float in CSharp?
I know about TryParse, but what I'm particularly wondering about is dots, commas etc.
I'm having problems with my website. On my dev server, the ',' is for decimals, the '.' for separator. On the prod server though, it is the other way round.
How can I best capture this?
Trying to parse a csv file that has all the data wrapped in double quotes, because there may be commas in the double quotes.
Looks like this:
$songs = '"1, 2, 3, 4 (I Love You)","Plain White T's","CBE10-22",15,"CBE10-22","","","CB",984,"","10/05/10"';
$regResult = preg_match( "", $songs, $matches );
I can't figure out a regex that will return the data between the quotes as the matches. I'm sure there is some regex master that can help me with this.
I'd like to be able to use ruby's OptionParser to parse sub-commands of the form
COMMAND [GLOBAL FLAGS] [SUB-COMMAND [SUB-COMMAND FLAGS]]
like:
git branch -a
gem list foo
I know I could switch to a different option parser library (like Trollop), but I'm interested in learning how to do this from within OptionParser, since I'd like to learn the library better.
Any tips?
I've tried everything (every method that shows up on a SO search), but I can't get it to work.
I'm trying to parse this:
questions = (
{
owner = {
"display_name" = "Neil";
};
title = "Initialising ";
"up" = 11;
"view" = 92;
}
);
I'm trying to get the display_name under owner.
From DateTimeFormatter javadoc:
Zone names: Time zone names ('z') cannot be parsed.
Therefore timezone parsing like:
System.out.println(new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy").parse("Fri Nov 11 12:13:14 JST 2010"));
cannot be done in Joda:
DateTimeFormatter dtf = DateTimeFormat.forPattern("EEE MMM dd HH:mm:ss z yyyy");
System.out.println(dtf.parseDateTime("Fri Nov 11 12:13:14 JST 2010"));
//Exception in thread "main" java.lang.IllegalArgumentException: Invalid format: "Fri Nov 11 12:13:14 JST 2010" is malformed at "JST 2010"
//at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:673)
I can't parse the JSON that I have no control of. What am I doing wrong here?
data.json
{
"img": "img1.jpg",
"img": "img2.jpg",
"size": [52, 97]
}
{
"img": "img3.jpg",
"img": "img4.jpg",
"size": [52, 97]
}
jquery
$.getJSON("data.json",
function(data){
$.each(data, function(i,item){
alert(item.img[i]);
});
});
Hi, I'm really confused as to why this is kicking up an error?
$admin = substr($_SERVER['REQUEST_URI'], 0, 7);
$account = substr($_SERVER['REQUEST_URI'], 0, 9);
if($admin != '/admin/' || $account != '/account/')
{
}
It is giving this error Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' Why is it doing this?
Thanks
Tom