Typical approaches recommend reading the binary via FileStream and comparing it byte-by-byte.
Would a checksum comparison such as CRC be faster?
Are there any .NET libraries that can generate a checksum for a file?
...
When I compare strings containing positive/negative numbers, for example:
int res1 = "-1".CompareTo("1");
int res2 = "-1".CompareTo("2");
res1 equals 1.
res2 equals -1.
How does String.CompareTo work?? That would mean it is order is "2 -1 1"...
...
I need to take two text blocks with html tags and render a comparison - merge the two text blocks and then highlight what was added or removed from one version to the next.
I have used the PEAR Text_Diff class to successfully render comparisons of plain text, but when I try to throw text with html tags in it, it gets UGLY. Because of t...
Hey I have a problem comparing the value of a CGPoint (struct with two ints: x and y) with another at certain time intervals.
One is called location and has the value of where the cursor is. Every half a second or so, I want to see if it changed. How do I do this? The language is Objective-C (so C++/C stuff should work)
...
Hello,
My program asks the user if the number he/she is thinking of is in a list. The user inputs a y or an n. How can I check if a user has entered y or n in assembly? Is it sufficient to put the user input into a register and branch if equal to 121 (decimal ASCII code for 'y') or branch if the value is equal to 110 (decimal ASCII code...
In a content management system, moderators have to approve changes to existing articles. Currently the system shows the old and the revised version of the text in plain text. It is a pain to find the actual differences.
In GoogleDocs, there is a 'Compare revisions' feature which highlights the differences between two documents.
If the...
I have database entrys that have a date column ( mySQL date type ). I want to compare that date with the current server date and with 3 days before that day, every month, to automatically send an email to a specified address.
...
Does anyone know of any tools that allow diff'ing between two web pages semantic markup rather than content?
Cheers.
...
What can I use to compare two text files in Windows?
Any software or website that you know of for the purpose??
...
I have a series of numbers, i.e. 6, 5, 7, 8, 9, 1, which through some mathematical process I will eventually obtain through repetition. For this reason, I want to use a vector to store the last six numbers yielded by this process and then compare the contents of that vector to the series of numbers above. If it identically matches the se...
I am pulling a datetime from a mysql db and i would like to add X hours to it then compare it to the current time. So far i got
$dateNow = strtotime(date('Y-m-d H:i:s'));
$dbTime = strtotime($row[0]);
then i tried $dbTime + strtotime("4 hours"); but 4 hours seem to add 4hrs to the current time instead of raw 4hours. How do i add X ho...
I want to determine how similar 2 images are.
The images may have been scaled, cropped, etc, so a simple pixel comparison won't work.
I have had a look around and there are a lot of academic papers on this topic but they don't release their code. So, do you know of a released library that can compare images (for Linux and Windows)?
...
I am comparing two xml and I have to print the difference. How can I achieve this using LINQ.
I know I can use XML diff patch by Microsoft but I prefer to use LINQ . If you have any other idea I will implement that
//First Xml
<Books>
<book>
<id="20504" image="C01" name="C# in Depth">
</book>
<book>
<id="20505" image="C02...
I'm looking for a diff/compare tool that shows differing lines from two text files, and gives me a space to comment on those files. Ideally this application would have three panes, pane one would be file A, pane two would file B and pane three would be a comment I can enter to on why the files are different.
We're going to be using this...
hi,
i would like to compare numeric data in rows. for eg, i have a table that has a column as such:-
Number
======
1.88
9.99
8.76
9.88
I want to compare 2nd value, 3rd value, 4th value to the 1st value. And then 3rd, 4th value to the 2nd. then 4th to 3rd.
How can i construct an sql to do this?
...
I am comparing to files by reading it into filestream and comparing byte by byte..now how can i skip whitespaces while comparing?I am using C#.net
...
I have two sets (although I can do lists, or whatever):
a = frozenset(('Today','I','am','fine'))
b = frozenset(('hello','how','are','you','today'))
I want to get:
frozenset(['Today'])
or at least:
frozenset(['today'])
The second option is doable if I lowercase everything I presume, but I'm looking for a more elegant way. Is it ...
Hello. I'm writing some C code for an embedded application, and I've run into a problem wherein a compare against an enumerated value is not being executed correctly. Take the following code snippet, for example:
typedef unsigned int UINT16;
typedef enum enum_items_tag
{
ITEM_1,
ITEM_2,
ITEM_3,
/* ... */
ITEM_918,
...
I have an object which itself has multiple objects as fields. The question I have is, I have two objects of these kind and I want to compare these two. I know I can do equals, comparator etc. but is there a way to use reflection to get the properties of the object and make comparison.
for example, if I have a Car object, which as wheel...
I want to check the last value changes.
Some times the objectId is the same as another objectId but the value can be different.
And i cant compare this to get the Last changes.
How do i do that?
This are the Objects
object(stdClass)#38 (6) {
["id"]=>
string(7) "1715680"
["objectId"]=>
string(1) "1"
[...