hi,
my window.location is "F:/html5/home.html", from my location i need to get the file name like this "home.html", to do this, how to i use the regularexpression command?
any one help me?
As I know, C inline function body should be defined in .h file.
Because it causes an error 'function-name used but never defined" if body defined in .c file.
Is this regular way? Or how to define inline function body in .c file?
I want to develop a command line tool. I didn't build one before, but I used a few, (like mercurial). What steps do I need to take to know how to do that? So what is the problem:
Regular console application need to be invoked from the command line only from it's directory. Like: C:\Projects\CommanLineProject\MyProjectConsole.exe. I want to use it from the command line from any directory, like mercurial.
I have a plug-in that I am distributing via an Eclipse update site.
I want to track how many times it is being downloaded, and preferably by whom.
For regular pages on my site, I can use Google analytics. However, Eclipse doesn't use any HTMLs when going for update sites.
Is there any way to do this when I don't have access to the hosting apache?
Hello,
I am using a regularexpression search to match up and replace some text. The text can span multiple lines (may or may not have line breaks).
Currently I have this:
$regex = "\<\?php eval.*?\>"
Get-ChildItem -exclude *.bak | Where-Object {$_.Attributes -ne "Directory"} |ForEach-Object {
$text = [string]::Join("`n", (Get-Content $_))
$text -replace $RegEx ,"REPLACED"}
Hi, how can change only the last letter of any word of a string with regular expressions?
I use mb_strtolower() for change strings from upper to lower in Greek language and I have problem with final 's'.
putStrLn "Enter the Artist Name"
art <- getLine
putStrLn "Enter the Number of CD's"
num <- getLine
let test= buyItem currentStockBase art num
printListIO (showcurrentList test)
the values i have to pass for buyItem is
buyItem currentStockBase "Akon" 20
but i want to send "Akon" to art and for 20 i want to send num
it gives me this error
ERROR file:.\Project2.hs:126 - Type error in application
*** Expression : buyItem currentStockBase art num
*** Term : num
*** Type : [Char]
*** Does not match : Int
please help me
After finishing my C++ class it seemed to me the structs/classes are virtually identical except with a few minor differences.
I've never programmed in C before; but I do know that it has structs. In C is it possible to inherit other structs and set a modifier of public/private?
If you can do this in regular C why in the world do we need C++? What makes classes different from a struct?
Hi,
I want to translate LINQ expression tree to SQL statement and I don't want to write my own code for this.
Example:
var query = from c in Customers
where c.Country == "UK" &&
c.City == "London"
select c);
To
SELECT ... FROM Customers AS c WHERE c.Country = "UK" AND c.City = "London"
I know DataContext.Log, but I want to use:
query.ToSqlStatementString()
Thanks
I've got a string:
public://imageifarm/3600.jpg
How can I extract the
imageifarm/3600.jpg
Part out using android?
What I've tried so far:
URL drupalQuestionNodeImageURI = new URL("public://imageifarm/3600.jpg");
Log.d("TAG", drupalQuestionNodeImageURI.getPath());
but it throws this exception:
09-16 17:24:39.992: W/System.err(3763): java.net.MalformedURLException: Unknown protocol: public
How can I solve this?
I know I can use regular expressions but that seems to defeat the purpose of URL(URI) in this case.
Is there a specific way to check for a specific integer within a switch statment.
For example.
$user = $ads[$i]->from_user;
To check for the number 2 as $i in the above expression.
Not interested in any source control OR shell integration.
This is basically to make regular gets on certain third party archives. I would really prefer not to deal with SVN in any way in my shell or visual studio.
Native / C# preferred (as i have those runtimes already installed).
Anyone a recommendation under those circumstances?
In the context of functional programming, a typical example of a side effect is "launch the missiles". I was just wondering where that expression comes from historically.
How can I scale a set of values to fit a new range if they include negative numbers?
For example, I have a set of numbers (-10, -9, 1, 4, 10) which have to scaled to a range [0 1], such that -10 maps to 0, and 10 maps to 1.
The regular method for an arbitrary number 'x' would be:
(x - from_min) * (to_max - to_min) / (from_max - from_min) + to_min
but this does not work for negative numbers. Any help is appreciated. Thanks!!
i need to remove content after using dreamweaver find & replace in multiple files (different content). how can i do that?. will regularexpression solve this issue?
Hi,
I do the validation through configuration files.
But, RegexValidator does not work properly.
This Validator not disciplined even to unknown regular expression!!
Do you know about this problem?
Many thanks!!!
I'd like to see what a website is sending when I submit a form.
Using Firebug I can see that it is regular POST form.
I'm interested in the coding of the form fields.
Thanks in advance!
I'm retrieving an unformatted String from a twitter feed. I want to be able to turn a text URL (http://blah.com/qwerty/) into a link but don't know how...is there a handy regularexpression for this?
I have an XML feed that looks something like this (excerpt):
<channel>
<title>Channel Name</title>
<link>Link to the channel</link>
<item>
<title>Heading 1</title>
<link>http://www.somelink.com?id=100</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 10:00:00</publishDate>
<guid>http://www.somelink.com/read-story-100</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<item>
<title>Heading 2</title>
<link>http://www.somelink.com?id=110</link>
<description><![CDATA[ Text here ]]></description>
<publishDate>Fri, 03 Apr 2009 11:00:00</publishDate>
<guid>http://www.somelink.com/read-story-110</guid>
<category domain="http://www.somelink.com/?category=4">Category 1</category>
</item>
<channel>
That's the rough of it. I'm using this piece of PHP (excerpt):
$xml = simple_xml_load_file($xmlFile);
$xml->xpath($pattern);
Now I want to get all ITEM-nodes (with their children) based on that pesky "domain" attribute in the category node, but no matter what I try it does-not-work.
The closest I got was "//category[@domain= 'http://www.somelink.com/?category=4']"
The expression I tried gave me this result:
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[domain] => http://www.somelink.com/?category=4
)
[0] => Category 1
The expression should contain all childrens of the two items in the example, but as you can see only the info in the category node is present, I want all the item nodes.
Any help would be highly appreciated.
I'm making a new php page and I get the error
Fatal error: Call to undefined function phpinclude_once() in /home8/nuventio/public_html/marketing/pb2/dashboard.php on line 1
I'm not sure why I'm getting this error, I've done previous pages the same way as this with no problems. This is the line in question:
<?php
include_once("../utils.php");
?>
After that it just goes into regular HTML code. It works fine without that line.
Is there a specific way to check for a specific integer within a switch statment.
For example.
$user = $ads[$i]->from_user;
To check for the number 2 as $i in the above expression.
I have created a dataset with fields "LastRunBuild" and "project" .The LastRunBuild field contain string of data seperated by commas according to each project. But Some Projects have no value in LastRunBuild field.When i am using this expression
" iif(Fields!LastRunBuild.Value=nothing,
nothing,Split(Fields!LastRunBuild.Value,",").GetValue(3)) "
a #Error value returns every time. Please reply...
I'm currently using regular expressions to search through RSS feeds to find if certain words and phrases are mentioned, and would then like to extract the text on either side of the match as well. For example:
String = "This is an example sentence, it is for demonstration only"
re.search("is", String)
I'd like to know where the is was found so that I can extract and output something like this:
1 match found: "This is an example sentence"
I know that it would be easy to do with splits, but I'd need to know what the index of first character of the match was in the string, which I don't know how to find
I'm writing a program which needs to traverse a set of directories. Tried to use the following code:
file.eachDirMatch(/.*[^.svn]/){
//some code here
}
But that ended up match none of my directories. I realize this boils down figuring out the right regex hang head in shame but even after revisiting some Java RegularExpression documentation I thought this should work.