If I have the string hello world , how can I modify the regex world|wo|w so that it will match all of "world", "wo" and "w" rather than just the single first match of "world" that it comes to ?
If this is not possible directly, is there a good workaround ? I'm using C# if it makes a difference:
Regex testRegex = new Regex("world|wo|w");
MatchCollection theMatches = testRegex.Matches("hello world");
foreach (Match thisMatch in theMatches)
{
...
}
Why is Python such a slow language, on average, compared to C/C++? I learned Python as my first programming language, but I've only just started with C and already I can feel and see the difference.
Guys I have a couple of questions:
Is there a preformance difference in Javascript between a switch statement and an if...else if....else?
If so why?
Is the behavior of switch and if...else if...else different across browsers? (FireFox, IE, Chrome, Opera, Safari)
what's the difference between
var div = document.createElement('div');//output -> [object HTMLDivElement]
document.getElementById('container').appendChild(div);
and
var div = '<div></div>';
document.getElementById('container').appendChild(div);//output -> <div></div>
shouldn't both be the same? and if not, how do i get the 2nd version to work?
Can someone tell me what the difference is between the following
public class CarCollection:List where T:Car
{
}
and
public class CarCollection:List
{
}
To me they seem to do the same thing, create type-safe collection of "Car" objects.
Can someone explain the difference between:
lock (someobject) {}
Using Mutex
Using Semaphore
Using Monitor
Using Other .Net synchronization classes
I just can't figure it out. It seems to me the first two are the same?
What's going on here? What is the subtle difference between the two forms of "unless"?
> irb(main):001:0> foo = true unless defined?(foo)
=> nil
irb(main):002:0> unless defined?(fooo) ; fooo = false ; end
=> false
thx
I am trying to detect a postback from Radiobutton list.
I am trying to use following code:
If Page.Request.Params.Get("__EVENTTARGET") = optDownload.UniqueID.ToString Then
But Page.Request.Params.Get("__EVENTTARGET") returns
"ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload$4"
And = optDownload.UniqueID.ToString returns
"ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload"
There is a difference in last 2 characters, how do I detect a postback from Radiobutton list?
I have actually 2 questions:
1)What is the difference between base64url encoding and base64 encoding and
2)How base64url encode is different from Facebooks base64url encode because facebook mentions that it sends url in a form of base64url but with no padding and two different characters. http://developers.facebook.com/docs/authentication/canvas (under Why Sign calls)
Can anyone plese provide a pseudocode with explaination for converting to and from each other.
In Flex ActionScript, a new object can be instantiated via the parameterless constructor with or without (). Example:
var array:ArrayCollection = new ArrayCollection()
or
var array:ArrayCollection = new ArrayCollection
Is there are difference between these two? Is one preferred over the other?
What's the difference between the two? They seem to have the same functionality at first glance.
Which one has faster performance which one is easier to use?
Hi guys i have this in my htaccess file, i was wondering what is it for ? what happens if i increase it to say 128mb or 16mb what difference would it make
I'm using
{% url facebook_xd_receiver %}
in one of my HTML files. This works just fine when I run my project using the command
python manage.py runserver
But the same project stops running and gives me a "TemplateSyntaxError" at the line
{% url facebook_xd_receiver %}
Can anyone please tell me what could be the difference between the dev server run through the command line and the apache server.
Is there anything I'm missing out on while configuring the Apache server? Or is it a Django problem?
What is the difference between the createGroup and createGroupIgnoreTooBig?
I understand that createGroup will throw the too big exception when the object exceeds 64k, and createGroupIgnoreTooBig will not. But does it mean that createGroupIgnoreTooBig allows me to create objects larger than 64k, or will it only partially group it?
I am writing a program that can have either a list or a string as an argument. How can I tell the difference between a string and a list programmatically in Erlang. Something like:
print(List) -> list;
print(String) -> string.
How to make two different files (their contents) equal using terminal in Linux? Suppose i have a file A in which the content is Hello world and i have a file B in which the content is Hello worlds. Now we find the difference between the 2 files using the diff or sdiff utility. Now i want to append the contents of the 2 different files into a single file or make the two different files (their contents) equal using terminal or any other utility.
What is the difference between normal datagrid and advance datagrid.Sorting,draging columns,resizing columns are supported even in normal datagrid.
I want to add footer details like summery,average etc of each column,does AdvanceDataGrid supports these features?
I'm about to create a function which adds to NSDateComponents together is there any advantage to putting this in a C style function or should it go in a Obj-C method?
Is there ever a reason to use one rather then the other or should I always stick to Obj-C?
BTW: Not that it makes any difference I'm sure but this is for an app on the iPhone
Many thanks
Hey.
I was coding here the other day, writing a couple of if statements with ints that are always either zero or one (~bools), and I asked myself:
Should I use if (int == 1) or if (int != 0) ?
Is there any difference at all?
Please, don't answer with stuff regarding the int may being more/less than 1/0, that's not what I want to know.
Which one out of the following two should be preferred while doing && operation on two values.
if (!StartTime.Equals(DateTime.MinValue) &&
!CreationTime.Equals(DateTime.MinValue))
Or
if (!(StartTime.Equals(DateTime.MinValue) && CreationTime.Equals(DateTime.MinValue))
What is the difference between the two?
i am going on a job interview and have zero experience with ms sql, however i have 1 year with oracle. is there such a huge difference between the two? what programming questions can i expect?