I'm searching for a way to parse the whole directory with source code with semantic. Is this possible to do without explicitly opening each file in emacs ?
I need to determind when a file has been uploaded via an ftp account so i can parse the data and insert into a db.
I could do this 2 different ways, either set up a schedule or watch the directory for any change. Either option would be fine.
I'm new to the apache /php space so any keywords that i can search upon would be handy.
Thanks.
I'm looking for some regular expression to help parse my CSV file.
The file has lines of
number,number
number,number
Comment I want to skip
number,number
number,number
Ex:
319,5446
564425,87
Text to skip
27,765564
I read each line into a string and I wanted to use some regular express to make sure the line matches the pattern of (number,number). If not then don't use the line.
I'd like to be able to parse out the city, state or zip from a string in python. So, if I entered
Boulder, Co
80303
Boulder, Colorado
Boulder, Co 80303
...
any variation of these it would return the city, state or zip.
This is all going to be user inputted data and inputted in one text field.
Hi All,
I am trying to parse the rdf file but
I am getting error while executing following code in ubuntu
RDF::Reader.open("http://datagraph.org/jhacker/foaf.rdf") do |reader|
reader.each_statement do |statement|
puts statement.inspect
end
end
as
LoadError: Could not open library 'libraptor': libraptor: cannot open shared object file: No such file or directory. Could not open library 'libraptor.so': libraptor.so: cannot open shared object file: No such file or directory
I installed all the required gems:
rdf
rdf-raptor
ffi
rdf-json
rdf-trix
Please help me how to rectify this problem
thanks in advance
Naveenkumr.R
function=
def parseTitle(self, post):
"""
Returns title string with spaces replaced by dots
""
return post.xpath('h2')[0].text.replace('.', ' ')
i would to see the content of post. Tried all .
How can i properly debug the content. ir is an webstite of movies where i rip links and tittle.
So this one should parse the title.and i am sure H@ is not existing , how to print/debug it?
I am trying to do some research on file formats especially image formats. Information such as header layouts for particular types of image formats and how to parse them using C++. If anyone can point me in the right direction of some good tutorials or books. that would be helpful. thanks
Hello guys I'm looking for a way on the iPhone to parse an XML document using DOM. I have been using SAX with NSXMLParser but now I really want a DOM tree (or anything that can quickly translate the XML document into an NSDictionary)
Thanks for any help
Hardware accelaration and embedded programming has mostly been used so far to parse datafeed and/or to route orders to exchange. Have there been attempts to write simpler HFT strategies such as equity market-making in hardware? Have they been successful? Which companies are doing this and what kind of programming model is used?
Hi, I have simple JSON object returned in form
{"d":"{\"Name\":\"DMX100\",\"Description\":\"blah blah\",\"ID\":\" 780\",\"Make\":\"2010\"}"}
How do I parse it in success.
success: function(msg)
{
$('#something').html(msg.d.Name);
}
Above code doesnt display Name but when I pass $('#something').html(msg.d);
it shows complete Json string. How do I reach to individual properties
Thanks
i am using XML as my backend for the application...
LXML is used to parse the xml.
How can i encrypt this xml file to make sure that the data is protected......
thanks in advance.
Hi! I am looking for method for parsing route path like this:
ActionController::Routing.new("post_path").parse
#=> {:controller => "posts", :action => "index"}
It should be opposite to url_for
Upd
I've found out:
http://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera
ActionController::Routing::Routes.recognize_path("/posts")
So now I need to convert posts_path into "/posts"
I am trying to create a link, which will, allow my paginated search to go onto the next page of results including the search term in the url
I get the following error with the link I have created
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dd615/public_html/searchPage.php on line 47
here is the link
echo "<a href='{$_SERVER['PHP_SELF']}?search=$_GET['search']?pagenumber=1'> FIRST </a>";
any help would be greatly appreciated
I am trying to use Haml with Grails but I am having some issues.
The plugin for haml has errors to parse empty lines. The plugin generate gsp files, so I think that I can use the online haml html generator.
Bug I want something like an editor with syntax highlithing, blocks, etc, and that generate html.
Is there something like this? Or only the editor?
thanks in advance
I am having trouble applying a style that is !important. Ive tried:
$("#elem").css("width", "100px !important");
This does nothing, no width style whatsoever is applied. Is there a jquery-ish way of applying such a style without having to overwrite cssText (which would mean id need to parse it first etc)
In symfony project, I would like to use an underscore as a separator
for the parameter in routing.yml.
Url example:
/article/lorem-1111_45.html
In routing.yml
rule_sample:
url: /article/:info-:datePublished_:id.html
param: { module: cms, action: test }
options:
segment_separators: ['-', '/', '.', '_']
requirements:
info: ^([A-Za-z0-9\-]+)$
datePublished: \d+
id: \d+
This code doesnt work. I have the following error:
Unable to parse "/article/:info-:datePublished_:id.html" route near
":id.html".
Anybody knows how to implement this rule ?
the model is :
class someModel(db.Model):
name = db.StringProperty()
def name_is_sss(self):
return self.name=='sss'
the view is :
a=someModel()
a.name='sss'
path = os.path.join(os.path.dirname(__file__), os.path.join('templates', 'blog/a.html'))
self.response.out.write(template.render(path, {'a':a}))
and the html is :
{{ a.name_is_sss }}
the page shows :
True
so i want to make it more useful, and like this:
the model:
class someModel(db.Model):
name = db.StringProperty()
def name_is_x(self,x):
return self.name==x
the html is :
{% a.name_is_x 'www'%}
or
{{ a.name_is_x 'www'}}
but the error is :
TemplateSyntaxError: Invalid block tag: 'a.name_is_x'
or
TemplateSyntaxError: Could not parse the remainder: 'www'
so how to make my method running
thanks
When my users enter a term like "word" I would like it be treated as a wildcard query "word*" so all terms beginning "word" are found. Is there a way to tell the QueryParser to automatically create wildcard queries or do I have to parse the query myself? This shouldn't be a problem for simple queries but it may become tricky for more complex queries.
Hi,
I am launching an activity to make a phone call, but when I pressed the 'end call' button, it does not go back to my activity. Can you please tell me how can I launch a call activity which comes back to me when 'End call' button is pressed? This is how I'm making the phone call:
String url = "tel:3334444";
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(url));
Thank you.
Hello,
I have an ANTLR grammar that can parse and evaluate simple expressions like 1+2*4, etc.
What I would like to do is to evaluate expressions like 2+$a-$b/4 where the $ variables are dynamic variables, that come from an external source and are continuously updated.
Is there any design pattern on how to do this using ANTLR, best practices, etc?
Shall I "substring" the $a with the updated value ($a - 4.34)
A nicer way to do this?
Thx
I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars.
Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can access from my PHP script ?
UPDATE: I have now written a PHP class which implements this. You can get the code from my website.
Hi,
is there any possibility to send from formtastic form value of :string field like
- semantic_form_for :project do |form|
- form.inputs do
= form.input :task_ids, :as => :string
as Array? Currently value of this field is sending as String and i'd like to no parse this string in controller.
Also, could you give me idea - if task with submitted id is not found - what is best way to catch this situation - validation in controller or what?
I have this xml model.
link text
So I have to add some node (see the text commented) to this file.
How I can do it?
I have writed this partial code but it doesn't work:
xmldoc=minidom.parse(directory)
child = xmldoc.createElement("map")
for node in xmldoc.getElementsByTagName("Environment"):
node.appendChild(child)
Thanks in advance.
As per the title, I'm trying to parse an XML file containing an xs:duration data type. I'd like to convert that into a Python timedelta object, which I can then use in further calculations.
Is there any built-in way of doing this? If not, what is the best way to achieve this?
How can I parse a strings like :
name1="val1" name2="val2" name3="val3"
I cannot use split(\s+) as it can be name = "val 1".
I am doing java but any laguage is okay.