comparison

Beginner OOP questions

Hi, I just want to ask two quick questions about OOP. First, is the code actually produced by OOP language compiler any different from procedural language compiler? I mean, is OOP just about how you write the code, or is the actual compiled code different from procedural? More accurate, procedural languages like C basically produce cod...

If functional languages are really concise, why don't they have a better rank in the language shootout game?

I compared the languages at the language shootout game by their code size only. Here is a summary of what I got (shortest first, grouped by similar score). Python, Ruby, JavaScript, Perl, Lua, PHP, Mozart/OZ OCaml, Erlang, Racket, Go, Scala, F#, Smalltalk Pascal, Clean, Haskell, Common Lisp, C#, Java, C C++, Ada, ATS I wonder why. ...

How is __eq__ handled in Python and in what order?

Since Python does not provide left/right versions of its comparison operators, how does it decide which function to call? class A(object): def __eq__(self, other): print "A __eq__ called" return self.value == other class B(object): def __eq__(self, other): print "B __eq__ called" return self.value...

comparing two string arraylists or lists

I have two SQL tables with data that I would like to compare. The tables have the following structures: id, title,url I want to compare the tables by title where if the strings are similar or equal it would be noted by writing the records to a file. Someone suggested not doing it in SQL and copying the data and using it in .net as lis...

SQL to LINQ compare 2 entities for changes - creating an audit trail

I am in the hypothetical phase of thinking of how to do something in code, so I have no concrete code examples yet. But, let's assume you have an entity type Person (with attributes such as first name, last name, DOB, etc.). When one goes to edit a person entity, you may only update one or two fields (possibly all, but usually not). T...

finding duplicate video files by database (millions), fingerprint? pattern recognition?

Howdy. In the following scenario: I got a project having a catalog of currently some ten thousand video files, the number is going to increase dramatically. However lots of them are duplicates. With every video file I have associated semantic and descriptive information which I want to merge duplicates to achive better results for eve...

Equality with CoreData string attribute not working

Hello, I can't see why this isn't working. I have two entities, let's call them Employees and Departments. And Departments has a String attribute called division. This works perfectly: NSLog(@"Division: %@",employee.department.division); The console shows, let's say, "Worldwide Seafood". But if I attempt a comparison with the exac...

Comparing one array against another in rails

Hi, I am using the 'contacts' gem in rails to retrieve a users contacts from their mail application. It returns the contacts like so: ["person name", "[email protected]"], ["person name", "[email protected]"], ["person name", "[email protected]"] etc... I want to compare this list to the Users already signed up for...

RightJS javascript library in daily use.

Wondering if anyone here can offer any insight into the ups/downs of using the RightJS library, specifically as compared to jQuery, and generally compared to what you think a library ought to offer. I'm not so much looking for a feature to feature comparison, but rather a sense of the general daily use. Things like: Does it feel nat...

Drawbacks of cakePHP framework

hello friends, Can any one list me out what are the drawbacks of CakePHP framework over other PHP frameworks? 1) And please explain why that missing feature is so important for a PHP project? 2) How that missing feature help the web developers those who using the Framework with that feature? ...

Does perl have an equivalent of +/- infinity for string comparisons?

In perl, for numerical comparison, we have +/- inf as numbers that are greater/less than every other number. Are there also strings that are gt/lt any other string? The reason I ask is that I'd like to tack one or the other on the end of a list of strings to ensure that a loop will terminate before the end of the list. ...

Language or Tools (IDE), which is more important?

I am curious whether other developers believe the quality of their programming language or their development tools is more important. Please consider your answer with regard to both productivity and daily enjoyment of work. ...

Comparing data bytewise in a effective way (with c++)

Question: Is there a more effective way to compare data bytewise than using the comparison operator of the c++ list container? I have to compare [large? 10kByte < size < 500kByte] amounts of data bytewise, to verify the integrity of external storage devices. Therefore I read files bytewise and store the values in a list of unsigned cha...

Demonstrating string comparison with Java

I want to demonstrate with a few line of code that in Java, that to compare two strings (String), you have to use equals() instead of the operator ==. Here is something I tried : public static void main(String Args[]) { String s1 = "Hello"; String s2 = "Hello"; if (s1 == s2) System.out.println("same strings"); else ...

Differentiating update of entries (business logic objects)

Hello, The situation I'm facing is as follows: There are large number of 'flat' files from which data is extracted by a C# app in order to create entries which are in turn written in a database (MS SQL server). A full release of the database comprises of ~ 97 million entries across 220 GB. The task is to create a differential update ...

RDBMS vs Key-Value pair databases

Why RDBMS? data integrity get quality results with SQL and prevent duplicates use SQL to access the data --> Easy. Many more Why Key-value pair? horizontally scalable Simple datasets - hashmap, associative arrays etc Easy to put() and get() Many more. So, is there some kind of wrapper available which binds with the "nosql" kind o...

Why nosql with cassandra instead of mysql ?

I work on large database (hundreds of GB) and Mysql now gives me more or less satisfaction. I hesitate to cassandra on launch. What I want to know everything before, so this kind of DBMS NoSQL is supposed to be faster than MySQL? Several points: The change in the number of column on a row In Mysql, they must all be defined in advance...

ASP.NET vs C# (comparison)

What is the difference between ASP.NET and C#? Is ASP.NET better than C#? And which language has a better labor market? ...

Java Or C++ ? Which is better ?

Iam a beginner in C++ language (2 years ago i starting to learn it) and now my friend that has a good skill in Java said me that 'learn Java Its better than C++' I said 'why' and she said 'Java is easy than C++ , java is speedy than C++ , java has a better Labor market and ...' please help me which language is better ? Java or C++ ? Th...

Java string comparison

I am comparing substrings in two large text files. Very simple, tokenizing into two token containers, comparing with 2 for loops. Performance is disastrous! Does anybody have an advice or idea how to improve performance? for (int s = 0; s < txtA.TokenContainer.size(); s++) { String strTxtA = txtA.getSubStr(s); strLengthA = txtA...