Top "Comparison" questions

Questions about data comparison and efficient ways to accomplish it.

Python None comparison: should I use "is" or ==?

My editor warns me when I compare my_var == None, but no warning when I use my_var is None. …

python comparison nonetype
Java Embedded Databases Comparison

I intend to develop a small (Java) application for managing my finances. I believe I need to use an embedded …

java database comparison embedded-database
How to check identical array in most efficient way?

I want to check if the two arrays are identical (not content wise, but in exact order). For example: array1 = [1,2,3,4,5] …

javascript arrays comparison
bash string compare to multiple correct values

i have the following piece of bashscript: function get_cms { echo "input cms name" read cms cms=${cms,,} if [ "$cms" != "…

string bash comparison compare
How do you compare two version Strings in Java?

Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't …

java comparison versioning
Comparing arrays for equality in C++

Can someone please explain to me why the output from the following code is saying that arrays are not equal? …

c++ arrays comparison equality
How do I fix this "TypeError: 'str' object is not callable" error?

I'm creating a basic program that will use a GUI to get a price of an item, then take 10% off …

python string user-interface comparison callable
What's the most efficient way to test two integer ranges for overlap?

Given two inclusive integer ranges [x1:x2] and [y1:y2], where x1 ≤ x2 and y1 ≤ y2, what is the most …

performance comparison integer range
Comparing two collections for equality irrespective of the order of items in them

I would like to compare two collections (in C#), but I'm not sure of the best way to implement this …

.net collections comparison equality
Check if an ArrayList contains every element from another ArrayList (or Collection)

There is probably a simple one-liner that I am just not finding here, but this is my question: How do …

java arraylist comparison contains