comparison

What are the most important functional differences between C# and VB.NET?

Certainly there's the difference in general syntax, but what other critical distinctions exist? There are some differences, right? ...

Difference between a byte array and MemoryStream

Howdy, I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors. Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be converted ...

How do I compare two arrays of DataRow objects in PowerShell?

I have two arrays of System.Data.DataRow objects which I want to compare. The rows have two columns A and B. Column A is a key and I want to find out which rows have had their B column changed and which rows have been added or deleted. How do I do this in PowerShell? ...

Comparing Arrays of Objects in JavaScript

I want to compare 2 arrays of objects in JavaScript code. The objects have 8 total properties, but each object will not have a value for each, and the arrays are never going to be any larger than 8 items each, so maybe the brute force method of traversing each and then looking at the values of the 8 properties is the easiest way to do w...

Comparing two XML Schemas

Are there any tools to effectively compare two XML schema's? I have seen some generic XML diff tools, but I was wondering if there is anything that knows more about schemas. ...

Comparison of Javascript libraries

After the suggestion to use a library for my ajax needs I am going to use one, the problem is that there are so many and I've no idea how to even begin telling them apart. Thus, can anybody A) Give a rundown of the differences or B) Point me (and others like me) somewhere that has such a list. Failing that plan C is to go with whichever...

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 control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git. Has anyone made a side-by-side comparison between git and hg? I'm interest...

Comparison of Lat, Long Coordinates

I have a list of more than 15 thousand latitude and longitude coordinates. Given any X,Y coordinates, what is the fastest way to find the closest coordinates on the list? ...

Differences in string compare methods in C#

Comparing string in C# is pretty simple. In fact there are several ways to do it. I have listed some in the block below. What I am curious about are the differences between them and when one should be used over the others? Should one be avoided at all costs? Are there more I haven't listed? string testString = "Test"; string anot...

Comparing two collections for equality

I would like to compare two collections (in C#), but I'm not sure of the best way to implement this efficiently. I've read the other thread about Enumerable.SequenceEqual, but it's not exactly what I'm looking for. In my case, two collections would be equal if they both contain the same items (no matter the order). Example: collectio...

A good algorithm similar to Levenstein but weighted for Qwerty keyboards?

I noticed some posts here on string matching, which reminded me of an old problem I'd like to solve. Does anyone have a good Levenstein-like algorithm that is weighted toward Qwerty keyboards? I want to compare two strings, and and allow for typos. Levenstein is okay, but I'd prefer to also accept spelling errors based on the physical d...

Can I convert the following code to use generics?

I'm converting an application to use Java 1.5 and have found the following method: /** * Compare two Comparables, treat nulls as -infinity. * @param o1 * @param o2 * @return -1 if o1<o2, 0 if o1==o2, 1 if o1>o2 */ protected static int nullCompare(Comparable o1, Comparable o2) { if (o1 == null) { if (o2...

Is there a way to "diff" two XMLs element-wise?

I'm needing to check the differences between two XMLs but not "blindly", Given that both use the same DTD, I'm actually interested in verifying wether they have the same amount of elements or if there's differences. ...

Comparing names

Is there any 'simple' algorithm to determine the likeliness of 2 names representing the same person? I'm not asking for something of the level that Custom department might be using. Just a simple algo that would tell me if 'James T. Clark' is most likely the same name as 'J. Thomas Clark' or 'James Clerk'. If there is an algo in C# that...

Biggest differences of Thrift vs Protocol Buffers?

What are the biggest pros and cons of Apache Thrift vs Google's Protocol Buffers? ...

What's the recommended best practice for using IEqualityComparer<T>?

I'm looking for real world best practice, how other people might have implented solutions with complex domains ...

C# Datatype for large sorted collection with position?

I am trying to compare two large datasets from a SQL query. Right now the SQL query is done externally and the results from each dataset is saved into its own csv file. My little C# console application loads up the two text/csv files and compares them for differences and saves the differences to a text file. Its a very simple applicatio...

How do the equality (== double equals) and identity (=== triple equals) comparison operators differ?

Can you explain the difference between == and ===, giving some useful examples? ...

Are there any Fuzzy Search or String Similarity Functions libraries written for C#?

There are similar question, but not regarding C# libraries I can use in my source code. Thank you all for your help. I've already saw lucene, but I need something more easy to search for similar strings and without the overhead of the indexing part. The answer I marked has got two very easy algorithms, and one uses LINQ too, so it's p...

What is "missing" in the Visual Studio 2008 Express Editions?

In particular, what functionality is not available? what restrictions are there on its use? ...