OK, this is stumping both me (rookie at Scala) as well as my colleague (more advanced at Scala). Scala 2.8.0. Here's a demonstration of the problem:
// I've got a var with some XML in it
scala> qq2
res9: scala.xml.Elem = <a><a1>A1</a1><bs><b>B1</b><c>C1</c><d>D1</d></bs></a>
// I can extract sub-elements
scala> (qq2 \ "bs")
res10: scal...
Hello!
How can I use str_ireplace (or something similar) to replace some text for formatting and then return it with the same caps?
Example:
$original="The quick red fox jumps over the lazy brown dog.";
$find="thE";
print str_ireplace($find,'<b>'.$find.'</b>',$original);
That will output:
thE quick red fox jumps over the lazy brown...
I asked this question earlier, but I changed the table structure based on recommendations. So, here's the question with the new tables and some additional requirements. I have the following tables:
Products
ID BIGINT
Name VARCHAR(64)
Category1_ID INT
Category2_ID INT
Category3_ID INT
Categories
ID BIGINT
Name VARCHAR(64)
Product_Key...
Hi guys,
I'm revising my question from a few days ago. Rewrote my query.
Can someone tell me why running any kind of query on multiple tables takes so long using the query I'll post below?
Is there anyone that has time to help me out with this? I can pay $200.00 I figure that's good for two hours of work. I'll post the answer back...
List(1,2) match {
case List(1,_) => println("1 in postion 1")
case _ => println("default")
}
compiles / works fine.
So do
List(1) match ...
List(3,4,5) match ...
but not
List() match ...
which results in the following error
found : Int(1)
required : Nothing
case List(1,_) => println("1 in postion 1")
Why does...
I am new to C# and am kind of confused what to do after reading some related posts about this topic.
I am giving an XML file from another tool. The XML file may not be valid as it may contain illegal characters and could be not well-formed. Unfortunately, the correction of illegal characters won't be done as the XML is generated from ...
Long story short:
>>> re.compile(r"\w*").match(u"Français")
<_sre.SRE_Match object at 0x1004246b0>
>>> re.compile(r"^\w*$").match(u"Français")
>>> re.compile(r"^\w*$").match(u"Franais")
<_sre.SRE_Match object at 0x100424780>
>>>
Why doesn't it match the string with unicode characters with ^ and $ in the regex? As far as I understand ...
I would like to write a macro in vb to select all rows where values in column B contain the characters 'via'. This is my first attempt at macros and not too sure how to begin.
...
var string = $.trim("How are you ? are you fine ?");
var part = $.trim("How are you ? are you fine ?");
var SearchResult = string.match(part);
if (SearchResult != null && part!="") {
alert("hello1");
}
string = $.trim("How are you ? a");
part = $.trim("How are you ? a");
SearchResult = string.match(part);
if (SearchResult != nu...
I'm trying to match the highlighted parts of this string:
<iframe maybe something here src="http://some.random.url.com/" and the string continues...
I need to match the src="" if it's placed inside of an tag. The iframe tag can be placed anywhere in the source.
Thanks in advance! :)
...
I need this to return an exact match while still being able to use the wild card.
So when searching for 'carb' i want to return a value such as 'Racing Carb'
but i do not want to return a value such as 'Racing Carburetor'
This is what I have now...
SELECT I.SKU, I.[Description]
FROM Inventory AS I
INNER JOIN MisspelledWords AS ...
I have two tables, employer and position:
Employer
eID
eName
Position
eID
salary
I need to match my eID between the two tables, determine what the max salary is, and print only the eName. Any suggestions as to how I can do this? I have tried multiple ways, but nothing seems to work.
I am not sure where to put in the max(salary) ...
I have a CSV containing list of 500 members with their phone numbers. I tried diff tools but none can seem to find duplicates.
Can I use regex to find duplicate rows by members' phone numbers?
I'm using Textmate on Mac.
Many thanks
...
There are two sets of URL, both contains millions of URLs. Now, How can I get an URL from A that is not in B. What's The best methods?
Note: you can use any technique, use any tools like database, mapreduce, hashcode, etc, . We should consider the memory efficient, time efficient. You have to consider that every set (A and B) have millio...
I just can't figure out how this works. What I am trying to do is let two players play a game if a third player joins it can instantly join the game, if the fourth and last player joins it can also instantly join the game. They can also leave the game at anytime for whatever reason, if that happens there should be a space open for anothe...
I am using a FreePascal web module designed for apache cgi-bin with nginx.
The CGI itself is called spidersample.cgi and contains modules such as hello, bye etc.
With Apache when spidersample.cgi/hello is called, spidersample.cgi gets executed, and passes control to the hello subroutine it contains.
With nginx instead of executing sp...
There has been a similar question concerning comparison of file trees, but
it was suggested to start a new question.
I think to write a file tree comparison tool for huge directory trees including
extended attributes. The available tools like find, diff, xattr seem to be not
optimum for that. I want to
compare huge file trees incremen...
I tried using all options in the menu setting Options|Display|Paren Highlighting, but nothing works - no parenthesis match is performed. I also tried setting explicitly (paren-mode 'blink-paren t) in my init file, but that did not help either. Any ideas what may be happening and how do I fix it?
Thanks.
...
I have a string:
users/554983490\/Another+Test+/Question????\/+dhjkfsdf/
How would i write a RegExp that would match all of the forward slashes NOT preceded by a back slash?
EDIT: Is there a way to do it without using a negative lookbehinds?
...
Hey all,
I am trying to delete all but one record from table where name field repeats same value more than 5 times and the address field repeats more than five times for a table. So if there are 5 records with a name field and address field that are the same for all 5, then I would like to delete 4 out of 5. An example:
id name address...