compare

Easiest way to compare arrays in C#

In Java, Arrays.equals() allows to easily compare the content of two basic arrays (overloads are available for all the basic types). Is there such a thing in C# ? Is there any "magic" way of comparing the content of two arrays in C# ? ...

Compare two object from the same class with tons of fields

I got two objects from the same class and I need to compare them field by field. The problem is that they have close to hundred fields and it would be helluva work to write that by hand. Do you know any way to do that the easier way? Reflections in Java could be a solution, but yet it seems to me like a hack. And I seek a C# solution af...

Trouble comparing two PHP variables

Hello, this may seem like a stupid question, but it is stumping me nontheless. I'm sure that the answer is something small. I think it's just one of those situations where I have been looking at the code for too long. I am trying to compare two PHP variables to see if they are the same. As you can see below, I am comparing $verification...

Javascript Arrays - Checking two arrays of objects for same contents, ignoring order

I have two JavaScript arrays (A and B) that contain objects that I created. I want to check that all the objects in array A are contained in array B, but not necessarily in the same order. What is the best way to do this? Edit: They are all actual objects, not primitives, so I will need to compare their contents and structure as well ...

Does SAS Programming have a meaningful future?

I saw some job offers for SAS Programmer. I hear nothing about SAS at my college and I really dont know what to think about it. Is it a niche programming platform like Oracle Forms or Lotus Notes? How does SAS Programming compare to Java, C# ? ...

compare two CGPDFDictionary

Is the a way to compare two CGPDFDictionaries? There is a function memcmp, but it doesn't work for me, because dictionaries are in different memory cells. ...

Compare 2 directories and copy differences to directory 3

Hello - I have three directories. I would like to compare directory1 with directory2, then take those changes/new files and copy them over to directory3. Is there an easy way to do this, maybe by using linux diff and cp commands? I'm open to ideas. Thanks! Andrew ...

Compare 2 images in php

Comparing 2 images to see if they are both the same files are easy, threw the files MD5, but is it possible or even plausible to determine if 2 images are same by using PHP GD to get the difference of the two images. If we where to get the difference of the two, and it was all white (id assume white or even black), then we would now know...

Best way to check new-line-independent-identity of 2 files with python

I tried filecmp.cmp(file1,file2) but it doesn't work since files are identically except for new line characters. Is there an option for that in filecmp or some other convenience function/library or do I have to read both files line by line and compare those? ...

Compare two arrays or arraylists, find similar and different values

Hi all, I have two arrays (or arraylists if it is easier) of strings. I need to compare these, find which only exist in the first array, which exist in both, and which only exist in the second array. These arrays are different lengths, and may be in different orders. If necessary, I suppose I could sort them... I know I could hack th...

Flex - compare string without considering the accents

Hi, I have a compare routine ... but I need it to understand that when i search a "e" I also search for "é" or "è". Is there an esay way to do that or do I really need to search and replace every accentued caractere before comparing ? Thanks ...

Compare two websites and see if they are "equal?"

We are migrating web servers, and it would be nice to have an automated way to check some of the basic site structure to see if the rendered pages are the same on the new server as the old server. I was just wondering if anyone knew of anything to assist in this task? ...

Compare PDF documents in Adobe Acrobat via SDK

We are planning on implementing a solution for comparing different revisions of a PDF document in our .Net Windows Forms application. In Adobe Acrobat there is a nice feature for comparing two documents, but I have not been able to find any information about whether it is possible to create a plug-in (or something else) to this feature f...

How do I compare packed values in Perl?

I want to use the pack() function in Perl to encode some data. Then I want to compare my packed structure to another packed structure. I want this compare to be on the byte values of this packed structure. According to the documentation, cmp uses the current locale to determine how to compare strings. But I don't want any intelligence a...

get the unmatched records from DataTable1 by comparing DataTable2

Dear All, I want to get the unmatched records from DataTable1 by comparing DataTable2 eg : Table 1 CallId Destination Call type 1 15515643 MOSE 2 16464996 MOSE 3 46169789 MOSTT 4 48892269 MOSTT Table 2 CallId Destination Call type 1 1551564...

Need to query "order date" larger than "filled date" any suggestions?

I have a query with over 500,000 rows of data in the output. I need to filter the criteria down so that I am comparing column "order date" to column "filled date". I want to find all orders with a filled date sooner than an order date (yes, that sounds backwards). Is there an easy way to query this in design view? I am not very good with...

SQL schema Table compare

I'm looking for an app that will compare the layout of 2 SQL tables. When developing in a DEV environment, I need a tool that will make the production tables exactly like the DEV tables (the layout). ...

Python list remove method: how's the implementation?

In java, I have my client class that have the "code" attr, and the equals method. Method equals receives another client and compares with itself's code attr. In python, I just read that we have the __cmp__ method, to do the same as java method equals. Ok, I did that. I created my class client, with "code" attr and the method comp that v...

SQL Server Integration Services - Incremental data load hash comparison

Using SQL Server Integration Services (SSIS) to perform incremental data load, comparing a hash of to-be-imported and existing row data. I am using this: http://ssismhash.codeplex.com/ to create the SHA512 hash for comparison. When trying to compare data import hash and existing hash from database using a Conditional Split task (expres...

Is there any better way for comparing a string with multiple strings?

Hello, I want to compare a string with multiple string.For ex if([var isEqualToString:@"Box"]||[var isEqualToString:@"Ball"]|[varisEqualToString:@"Bat"]) { some function }else{ some fuction } In my case i have to compare with 15 string, so i have to check for 15 times.Is there any other better way to compare it.Is there any small sim...