comparison

Comparing sound files if not completely identical

Is there any way to programatically compare two sound files to determine if they are identical, or nearly identical? These are not mp3 files and do not have any ID3 or other meta data, but plain wav files. Comparing the checksum values may not work as they may not be completely identical. ...

Comparison of .NET Validation Frameworks

I was searching for a validation framework for .NET. I saw a few, but I didn't see any comparisons. Which one do you prefer to use, and why? ...

When to use an interface instead of an abstract class and vice versa?

This may be a generic OOP question. I wanted to do generic comparison between an interface and an abstract class on the basis of their usage. When would one want to use and interface and when would on want to use an abstract class? ...

Java library for free-text diff

I need to match up two almost-the-same long freetext strings; i.e., to find index-to-index correspondences wherever possible. Because this is freetext, the comparison should not be line-based as in code diffing. Any suggestions for Java libraries? A simple example (In real life , of course, there would not be extra whitespace to lin...

How to simplify a null-safe compareTo() implementation?

I'm implementing compareTo() method for a simple class such as this (to be able to use Collections.sort() and other goodies offered by the Java platform): public class Metadata implements Comparable<Metadata> { private String name; private String value; // Imagine basic constructor and accessors here // Irrelevant parts omitted...

What are the major differences between databases?

I'm not fanatic on any database but I wish to see differences between vendors. For instance, I use mostly Oracle and I see that others (MySQL, SQL Server, PostgreSQL, ...) cannot do: Connect by queries. Model queries. Flash back (query, table and database). The same for SQL Server, that others cannot do: Top results. ...

fine db comparer program for mysql

working with ms sql I have several tools I use to compare DB structure and data, like sql-compare, sql-delta, SqlClarity Effects, etc... is there some equivalent program for mysql??? I need a programa that can show me differences and, if possible, prepare the synchronize scripts... if it's free it would be better... ...

What's the advantage of using C over C++ or is there one?

Since C++ seems to have all of C's features, why learn C over C++? ...

Weighted search algorithm to find like contacts

I need to write an algorithm that returns the closest match for a contact based on the name and address entered by the user. Both of these are troubling, since there are so many ways to enter a company name and address, for instance: Company A, 123 Any Street Suite 200, Anytown, AK 99012 Comp. A, 123 Any St., Suite 200, Anytown, AK 9901...

Is there an easy way to compare how close two colors are to each other

Is there a way to compare how close two colors are to each other? If to say both of them are blue. At the moment the way that we compare them is to manually assign each possible color to a color family(red, green, blue...). And then just compare the strings :) But surely that manual task can be assigned to a neat little algorithm. ...

How different is CakePHP from Ruby on Rails?

I almost never hear the word CakePHP without hearing the word Rails shortly afterwards. Are these two frameworks mainly similar based on how they adhere to the MVC model or do they have other significant similarities/differences? One of the main attractions of Rails for me is how easy it is to do Ajax. Would that also be true of CakePH...

Should I heed Derek Sivers' warnings about migrating from PHP to Rails?

As you probably know, Derek Sivers is the guy who created CD Baby and eventually sold it for some big bucks. He wrote it in PHP originally and then down the road set about rewriting it in Rails. His troubles are the stuff of legend: 7 reasons I switched back to PHP after 2 years on Rails That article came out in 2007 but being newly in...

How can I compare the values in two arrays?

It seems that every PHP function I read about for comparing arrays (array_diff(), array_intersect(), etc) compares for the existence of array elements. Given two multidimensional arrays with identical structure, how would you list the differences in values? Example Array 1 [User1] => Array ([public] => 1 [private] =>...

Comparing object properties in c#

This is what I've come up with as a method on a class inherited by many of my other classes. The idea is that it allows the simple comparison between properties of Objects of the same Type. Now, this does work - but in the interest of improving the quality of my code I thought I'd throw it out for scrutiny. How can it be better/more eff...

embedding one kind of syntax inside another: is it kludge or clever?

Background: Recently while looking at a "structured text editor" I noticed they used a trick to change python/perl/c++/java et al. into a "structured" outline by sneaking XML into the comments of the respective languages. I remembered seeing this trick inside a windows bat file once as well. The REM statements of the bat file were used ...

Use '=' or LIKE to compare strings in SQL?

Hi! There's the (almost religious) discussion, if you should use LIKE or '=' to compare strings in SQL statements. Are there reasons to use LIKE? Are there reasons to use '='? Performance? Readability? Thanks in advance! ...

Python or php which language would be better for web development?

Python or php which language would be better for web development? ...

Future of Fusebox framework

Good old Fusebox was my first framework and I still really like it. Started with PHP version, currently using latest CFML version. But time goes by and I'm wondering: maybe I should switch to another framework? Well, I don't want to start holy war here. I just want to know the pros and cons of continuing using FB. Say, I think that n...

Comparing a string with the empty string (Java)

Hello, I have a question about comparing a string with the empty string in Java. Is there a difference, if I compare a string with the empty string with == or equals? For example: String s1 = "hi"; if (s1 == "") or if (s1.equals("")) I know that one should compare strings (and objects in general) with equals, and not ==, but I a...

Why would you use Oracle database?

I'm curious for technical reasons why you choose Oracle database versus the latest flavors of: 1) Microsoft SQL Server 2) MySQL 3) PostgreSQL What features or functionality justify the extra cost. I'm interested in technical arguments, not a religious war. A friend asked me this and I've always used one of the 3 I listed. I didn't kn...