comparison

Any difference in compiler behavior for each of these snippets?

Please consider following code: 1. uint16 a = 0x0001; if(a < 0x0002) { // do something } 2. uint16 a = 0x0001; if(a < uint16(0x0002)) { // do something } 3. uint16 a = 0x0001; if(a < static_cast<uint16>(0x0002)) { // do something } 4. uint16 a = 0x0001; uint16 b = 0x0002; if(a < b) { // do something } Wha...

c# finding matching words in table column using Linq2Sql

I am trying to use Linq2Sql to return all rows that contain values from a list of strings. The linq2sql class object has a string property that contains words separated by spaces. public class MyObject { public string MyProperty { get; set; } } Example MyProperty values are: MyObject1.MyProperty = "text1 text2 text3 text4" MyObje...

what is the difference between json and xml

what is the difference between json and xml ...

What is the fastest way to compare 2 rows in SQL?

I have 2 different databases. Upon changing something in the big one (i don't have access to), i get some rows imported in my databases in a similar HUGE table. I have a job checking for records in this table, and if any, execute a stored procedure, process and delete from table. Performance. (Huge amount of data) I would like to know ...

Java and C#, how close are they?

I've been using C/C++ and Python pretty seriously, but I now I see that a lot of new programming books use Java or C# as examples. I don't think I'll use Java or C# for the time being, but I guess I have to study one of the languages (or both of them) in order to read and understand the books. How similar Java and C#? If I learn Java...

html5 vs flash - full comparison chart anywhere?

So since Steve Jobs said Flash sucks and implied that HTML5 can do everything Flash can without the need for a Plugin, I keep hearing those exact words from a lot of People. I would really like to have a Chart somewhere (similar to http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28HTML5%29#Form_elements_and_attributes ) that ...

2 approaches for tracking online users with Redis. Which one is faster?

Recently I found an nice blog post presenting 2 approaches for tracking online users of a web site with the help of Redis. 1) Smart-keys and setting their expiration http://techno-weenie.net/2010/2/3/where-s-waldo-track-user-locations-with-node-js-and-redis 2) Set-s and intersects http://www.lukemelia.com/blog/archives/2010/01/17/redis...

Why do two array values look the same, but don't evaluate as equal?

When I compare two array values I see two strings that look the same. php doesn't agree. $array1 = array('address'=>'32 Winthrop Street','state'=>'NY'); $array2 = array('address'=>'32 Winthrop Street'); $results = array_diff_assoc($array1, $array2); var_dump($results) //echos ['address'] => string(18) "32 Winthrop Street" ['state']=...

Java: String compare library that returns diff count as an int?

Does a library or even standard API call exist that allows me to diff two strings and get the number of diff chars as an int? I wouldn't mind other features, just as long as I can get a more programmatic diff result (such as an int) instead of something that just outputs the entire human readable diff. ...

Does ( 0 < 0 ) return true?

ill have an if statement if (int1 < int2) {} else {} I want the else statement to run if both int1 and int2 are 0.. ...

spring mvc vs seam

Hi, Spring mvc is a framework that has been long time out there, it is well documented and proven technology. A lot of web sites are using spring. Seam is a framework based on jsf - rich faces implementation. It has a lot of ajax based components. It uses some heavy stuff like EJB, JPA. All of this is prone to errors and this framework...

Need compare tables utility for SQL Server

Command line or library "compare tables" utility for SQL server with comprehensive diff output to a file in .Net I can't find anything like that. Commercial or free ( XSQL Lite is suitable for my case and ) tools show diffs in grids with possibility to export to CSV. Also they generate sync SQL scripts when run from command line. Wha...

Does this behavior exist in all major databases?

mysql> select 0.121='0.121'; +---------------+ | 0.121='0.121' | +---------------+ | 1 | +---------------+ Does it hold for other database that number='number' is true? ...

What makes these two R data frames not identical?

I have two small data frames, this_tx and last_tx. They are, in every way that I can tell, completely identical. this_tx == last_tx results in a frame of identical dimensions, all TRUE. this_tx %in% last_tx, two TRUEs. Inspected visually, clearly identical. But when I call identical(this_tx, last_tx) I get a FALSE. Hilariously, e...

Compare only date javascript

Hi all, I can't seem to figure out what is wrong with my code. Maybe it would be simpler to just compare date and not time. Not sure how to do this either and I searched but couldn't find my exact problem. BTW, when I display the two dates in an alert, they show as exactly the same. My code: window.addEvent('domready', function() { va...

How to find rectangle of difference between two images

I have two images the same size. What is the best way to find the rectangle in which they differ. Obviously I could go through the image 4 times in different directions, but i'm wondering if there's an easier way. Example: ...

For who know both Java Web and Desktop

For who know both Java Web and Desktop, is it more easy a Java Desktop programmer change to Web, or vice versa? ...

WSDL vs DLL. Which is better?

I would like to create a reusable interface to transfer some proprietary information over the TCP/IP connection. If given only the choice of either Web Services or distributing a pre-compiled Assembly, what are the pros and cons of using each? This is assuming that Windows OS is used. ...

Virtual methods as Comp function to sort

Hello everyone! I'm new to C++ and i'm trying to use std::sort function to sort a vector of Solutions. The code is something like this (solution list is a *vector): void SolutionSet::sort(Comparator &comparator) { std::sort(solutionsList_->begin(), solutionsList_->end(), &comparator::compare); } The comparator param is a Comparat...

Comparison of databases on the performance of Ruby on Rails

It is well-known that Ruby on Rails offers a list of choice on database adapters, like MySQL, PostgreSQL, Sqlite, MSSQL, Oracle, DB2. All of them offers the same basic set of SQL on CRUD. Is there any comparison on their performance when running a typical Ruby on Rails application? ...