Hello,
I have:
$page_file_temp = $_SERVER["PHP_SELF"];
which will output: /templates/somename/index.php
I want to extract from that path only "/templates/somename/"
How can I do it?
Thanks!
I have a need to search a pdf file to see if a certin string is present. The string in question is definately encoded as text (ie. it is not an image or anything). I have tried just searching the file as though it was plain text, but this does not work.
Is it possible to do this? Are there any librarys out there for .net2.0 that will extract/decode all the text out of pdf file for me?
I'm trying to extract an mp3 from a flash compatible mp4 file and have so far found FFMpeg and a bunch of different wrappers that all claim to be able to do the job.
Ideally, I'd like to not have to rely on shelling to the FFMpeg exe, but none of the wrappers I've tried seem to work....
Has anyone got any code or advice for how to go about this?
Thanks!
Hi all,
Please could someone help me, i will be forever appreciative.
I'm trying to create a regular expression which will extract 797 from "Your job 797 ("job_name") has been submitted"
or "Your Job 9212 ("another_job_name") has been submitted" etc.
Any ideas? Thanks guys!
Hi,
I have to extract columns from a text file explained in this post:
http://stackoverflow.com/questions/2499746/extracting-columns-from-text-file-using-perl-similar-to-unix-cut
but I have to do this also in a Windows Server 2008 which does not have Perl installed. How could I do this using PowerShell? Any ideas or resources? I'm PowerShell noob...
I am trying to extract a number from a string. The number might be zero. Numbers appear like this: '+123', '-8' or '0'.
alert( '+123'.match(/[-?|+?]\d+/) );
alerts +123
alert( '-8'.match(/[-?|+?]\d+/) );
alerts -8
alert( '0'.match(/[-?|+?]\d+/) );
alerts null // why oh why?
How do I get '0'.match(/[-?|+?]\d+/) to return 0 instead of null?
I want to extract key value pairs of some form elements in a html page
for example
name="frmLogin" method="POST" onSubmit="javascript:return validateAndSubmit();" action="TG_cim_logon.asp?SID=^YcMunDFDQUoWV32WPUMqPxeSxD4L_slp_rhc_rNvW7Fagp7FgH3l0uJR/3_slp_rhc_dYyJ_slp_rhc_vsPW0kJl&RegType=Lite_Home"
is there any method using which I can safely get the key and value pairs. I tried using splitting by spaces and then using '=' characters but string inside quotes can also have '='.
is there any different kind of split method which can also take care of quotes?
I am developing validation and linting utility to be integrated with various commit hooks, including Git one
https://github.com/miohtama/vvv
Currently validators and linters are run against the whole project codebase on every commit. However, it would be much more optimal to run them against changed files only. For this, I would need to know changed files list in my Git precommit hook (in Python)
https://github.com/miohtama/vvv/blob/master/vvv/hooks/git.py
What options I have to extract the changed files list (in Python if that matters)?
I'm a newbie to regular expressions and I have the following string:
sequence = ["{\"First\":\"Belyuen,NT,0801\",\"Second\":\"Belyuen,NT,0801\"}","{\"First\":\"Larrakeyah,NT,0801\",\"Second\":\"Larrakeyah,NT,0801\"}"]
I am trying to extract the text Belyuen,NT,0801 and Larrakeyah,NT,0801 in python. I have the following code which is not working:
re.search('\:\\"...\\', ''.join(sequence))
I.e. I want to get the string between characters :\ and \.
file.txt contains:
##w##
##wew##
the command:
cat file.txt | grep [[:alpha:]]* -o
outputs nothing. I'm trying to extract the text inside the hash signs. What am i doing wrong?
I want to parse the html table using html agility pack. I want to extract only some predefined column data from the table.
But I am new to parsing and html agility pack and I have tried but I don't know how to use the html agility pack for my need.
If anybody knows then give me example if possible.
The compile output says no% in line 240 of the makefile.
Here is an extract of that portion in the Makefile:
debug/lv.simplon.class.o: c:/SimplonQt/include/lv.simplon.class.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/lv.simplon.class.o c:/SimplonQt/include/lv.simplon.class.cpp
I'm loading a project I have saved in my C drive in Windows, but I am not sure what exactly is the cause of the problem.
Thanks in advance!
I am new to TDI.
I have a TDI assembly line that calls a web service (ibmdi.InvokeSoapWS) which returns the result as a string in the work attribute 'xmlString'. I then have an AttributeMap that attempts to parse the xml and extract a value (the node it seeks is a few nodes deep).
var parser = system.getParser('ibmdi.SOAP');
var xmlString = work.getString('xmlString');
var entity = parser.parseRequest(xmlString);
task.dump(entity);
The trouble is, the parsed object does not contain an accurate representation of the XML. It contains only two attributes, the first is correctly the first node following the soap body (e.g., ns0:SomeNodeReply), the second being a node inside the first (e.g., ns0:DetailCount). And as far as I can determine, both attributes are just strings so I cannot recurse into the object graph.
Below is a sample soap reply:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns0:SomeNodeReply xmlns:ns0="http://xmlns.example.com/unique/default/namespace/1136581686664">
<ns0:Status>
<ns0:StatusCD>000</ns0:StatusCD>
<ns0:StatusDesc />
</ns0:Status>
<ns0:DetailCount>1</ns0:DetailCount>
<ns0:SomeDetail>
<ns0:CodeA>Foo</ns0:CodeA>
<ns0:CodeB>Bar</ns0:CodeB>
</ns0:SomeDetail>
</ns0:SomeNodeReply>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
And below is a sample dump of the parsed string:
19:03:23 CTGDIS003I *** Start dumping Entry
19:03:23 Operation: generic
19:03:23 Entry attributes:
19:03:23 SOAP_CALL (replace): 'ns0:SomeNodeReply'
19:03:23 ns0:DetailCount(replace): '1'
19:03:23 CTGDIS004I *** Finished dumping Entry
All I really need to do is be able to parse out a value that may or may not be there, depending on the value of another node (e.g., DetailCount == 1, get CodeA otherwise return empty string). I am open to changing anything about how this works if I can extract the data into the work Entry.
I want to track which character is deleted by the user through Delete or BackSpace Key.
I am handling RichTextBox_ChangedEvent of textbox.
Can I extract the deleted character from TextChangedEventArgs *e.Changes* and if yes How can I do that?
I want to restrict user to from deleting any characters from the TextBox. I want user can delete only two characters ( let's say "(" or ")" )
Please suggest.
Hi
I have a velocity ivar defined as a CGPoint.
I need to somehow extract just the 'x' value of velocity, and then use this to call-send a message to the following method signature
-(void) adjustTimer:(NSTimeInterval*)newInterval
How do I obtain just the 'x' value of a CGPoint?
Do I then need to convert or cast this result before calling my adjustTimer method?
Hi,
I'm trying to extract data from one of my websites using Greasemonkey. Problem is, the script runs 6 times because apparently the page loads content from 6 different servers.
So if I put in an alert ("Hey"); the code runs 6 times and I get 6 alerts.
How can I wait for the entire page to load and then start playing with the DOM. Also, I'm using jQuery.
Thanks
My company is planning in hiring outsourcers to work for us, but concerned to give whole existing code to outside world.
What is the proper way to deal with security of sharing code in such cases?
Is it possible to restrict part of code for developers? So each of them could work on their project without having access to whole repository.
P.S. The code we have is very integrated, and its hard to extract "one module", each module can use files from different locations.
Thanks in advance
Hi,
I've been working with a Legacy application which interacts with a database through ADODB, and most of the changes to records follow a fairly straightforward pattern of:
Create a Recordset from a query
Make various change to the recordset
call .Update on the recordset.
What I'm wondering is, with ADODB recordsets, is there anyway to extract the 'changes'. The logic which changes the recordset is scattered about, and all I need is the changes, not how it was changed...
Any suggestions for tracking changes in a recordset (in code, a trigger on the DB or similar is no use here)
Thanks in advance
Hi,
I am trying to develop a lotus notes database which can connect to another notes database and extract all the information like forms count, views etc.
Any suggestions on how to proceed?
Thanks
Hi All,
I want an Open File Dialog with *.class ,*.jar filters.
I want that *.jar files will be treated as folders (pressing OK or double-click should display the jar file content [ *.class] ). This capability is very similar to the TotalCommander archive plugin that let you browse inside archive files in-place (without the need to extract them, etc...)
Any ideas how it could be done? Can I use something that is already implemented?
Thanks,
Guy
input is a string (var str) something like this:
`<<hello there//abcd//1234>>
I want to know how to best extract the information to have this:
var a = "hello there";
var b = "abcd";
var c = 1234;
case a: select everything after << until first //
case b: select everything after first // until second //
case c: select everything after second // until
Anybody knows a simple solution?
THX
I am trying t o create img captions based on src value match.
JQUERY : What is the best way to extract "Author-ABC" from an img with src value wwww.abcd.com/images/imagename_Author-ABC_.jpg and replace the alt value with this value.
DRUPAL : Is there a way to preprocess this a drupal template function and save the value in img alt attribute?
Ideas?
Basho
Why does socket.inet_aton returns packed format in python?
If I am storing the IP as integer in Database (mysql), do I have to always extract the integer value or is there any easier way out?
Hi
Is there any plugins or built-in method in vim for performing refactoring on c or c++ code, something like the refactoring tools in eclipse?
I'm especially keen on the extract method refactoring tool from eclipse that will determine parameters from new method and typically also guess a variable to use as return value.