Top "Comparison" questions

Questions about data comparison and efficient ways to accomplish it.

What is the Difference Between Mercurial and Git?

I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source …

git version-control mercurial comparison dvcs
Use '=' or LIKE to compare strings in SQL?

There's the (almost religious) discussion, if you should use LIKE or '=' to compare strings in SQL statements. Are …

sql comparison
How to check if a variable is not null?

I know that below are the two ways in JavaScript to check whether a variable is not null, but I’…

javascript comparison null-check
Comparing two dictionaries and checking how many (key, value) pairs are equal

I have two dictionaries, but for simplification, I will take these two: >>> x = dict(a=1, b=2) >&…

python dictionary comparison
Comparing chars in Java

I want to check a char variable is one of 21 specific chars, what is the shortest way I can do …

java comparison char
Comparing date part only without comparing time in JavaScript

What is wrong with the code below? Maybe it would be simpler to just compare date and not time. I …

javascript date comparison mootools
JQuery string contains check

I need to check whether a string contains another string or not? var str1 = "ABCDEFGHIJKLMNOP"; var str2 = "DEFG"; Which function …

javascript jquery string comparison contains
How can I check if a Perl array contains a particular value?

I am trying to figure out a way of checking for the existence of a value in an array without …

perl arrays comparison
Comparing two strings, ignoring case in C#

Which of the following two is more efficient? (Or maybe is there a third option that's better still?) string val = "…

c# string comparison equals
Check if two unordered lists are equal

I'm looking for an easy (and quick) way to determine if two unordered lists contain the same elements: For example: […

python list comparison