compare

Compare strings in haskell

I have two strings given as arguments to a Haskell function. s1 is smaller than s2 if s1 is shorter than s2 or if they have the same length and s1 is lexicographically smaller than s2. ...

identifying code improvements

We've just gone through a pretty major system rewrite and I have been asked to find and identify areas of the code that have been improved. as a way to justify to the customer that the effort we've spent was worthwhile. Identifying the areas isn't really the hard part but I'm struggling with how to best present this information. Any su...

Is there any Java API available to compare two microsoft word documents?

I am looking for a Java API which can compare two microsoft word documents. We are using Linux server so we can't install Microsoft Word in it. EDIT :- We want to compare two document and what ever things are not common that we have to highlight with some color or any other way ... So I thing we have to merge both document and highligh...

Sequence comparison in java.

I'm looking for a standard algorithm/code (Java) which compares two integer lists (old and new) and gives a third result list which provides actions to convert the 'old' list into the 'new' list. For example: old-> 1, 2, 3, 4 new-> 9, 2, 3, 6, 4 so the result should be something like: 1-, 9+, 2, 3, 4-, 6+, 4+ Here, the suffix: ...

how to compare two msword document in java ?

I am looking for a Java API which can compare two microsoft word documents. We want to compare two msword document and things which are not common that we have to highlight with some color or any other way ... So I thing we have to merge both document and highlight content which are not common. We are using Linux server so we can't ins...

Javascript String Compare

How could the following code sometimes evaluate to false? (transport.responseText == '1' || transport.responseText == 'CARD_VALID') My code is as follows: if (transport.responseText == '1' || transport.responseText == 'CARD_VALID') { // do something.... } else if (transport.responseText == 'CARD_INVALID' || transport.responseText ==...

Easiest way to compare two Excel files in Java?

I'm writing a JUnit test for some code that produces an Excel file (which is binary). I have another Excel file that contains my expected output. What's the easiest way to compare the actual file to the expected file? Sure I could write the code myself, but I was wondering if there's an existing method in a trusted third-party library (...

How can I suppress the message in Star Team

While comparing Excel files, I get the following message: StarTeam One or more files are not text only! Do you still want to use alternative compare utility C:\Program Files\Beyond Compare 3\BComp.exe? Yes No Cancel ...

Comparing Strings in Cocoa

I have tried: - (NSString*) generateString { NSString* stringToReturn = @"thisString"; return stringToReturn; } - (void) otherMethod { NSString *returnedString = [self generateString]; if (returnedString == @"thisString") { // Do this } else if (returnedString == @"thatString") { // Do that } } Which never...

how to compare 2 ms word document with org.eclipse.compare api and java.

hi I want to compare 2 ms word document, after searching lot I found 2 ways we can do this. 1) compare with docx4j api. 2) compare with org.eclipse.compare api. with docx4j we can compare only 2 paragraph and it will works only with .docx extention. so I feel like if we can compare docs with eclips compare api than it will be better...

Compare and merge 2 MS Word documents with Java and OpenOffice API?

How do I compare and merge 2 MS Word documents with Java and the OpenOffice API? I just want to conform that is it possible to compare 2 MS Word documents with the OpenOffice API. ...

comparing strings in vb

hi, hopefully this should be an easy question. In java i know it's compareto, i think. how do i compare 2 string variables to determine if they are the same? ie: if(string1 = string2 AND string3= string 4) then perform operation else perform another operation end if Thanks ...

std::string comparison

I need to check whether an std:string begins with "xyz". How do I do it without searching through the whole string or creating temporary strings with substr(). Thanks. ...

JSF <c:if> with different object type

Hello, I'm trying to compare two different object in JSF. A String and an Integer, of cours it don't work... //myVar ==> Integer object //myVar2 ==> String <c:if test="${myVar == myVar2}"> YES!!!!!!!! </c:if> I try with myVar.toString but it's wrong. So how to do it ? Thank's ...

C# Binary File Compare

I'm in a situation where I want to compare two binary files. One of them is already stored on the server with a pre-calculated Crc32 in the database from when I stored it originally. I know that if the Crc is different then the files are definitely different. However, if the Crc is the same I don't know that the files are. So what I'm l...

Create possible pairs irrespective of order in a indefinite set of values.

What i am trying to figure out is an algorithm that will create possible pairs irrespective of order in a indefinite set of values. for example let's say the set is A,B,C,D,E then possible sets are AB AC AD AE BC CD DE but... i also want pairs of more than 2 values. for example ABC ABD ABE BCD BCE but also ABCD or ABCE. The proble...

How to compare text in one box to another and highlight what's wrong in red

I'm brand new at VB and I made a program that utilizes two languages. I want to check one box against another and highlight, in red, the text that doesn't match up. Does anyone know an easy way for me to do this? Thanks! ...

Compare two structs' values in C#

I'm not looking for a comparison of two structs that returns bool, I am wondering if there is a way to get which fields of two structs (the same structure, but maybe different values) are different. Basically I want a simpler way to do the following: public class Diff { public String VarName; public objec...

Compare two lists or arrays of arbitrary length in C#; order is important

Say I have two lists or arrays of strings. For example: list 1: "a", "c", "b", "d", "f", "e" list 2: "a", "d", "e", "f", "h" List 1 and list 2 are of arbitrary lengths. List 1 may contain elements not in list 2, and visa versa. I'd like to know when items in list 1 are found in list 2, and more specifically I want to know when an i...

Understanding bitwise operations in javascript

I am currently storing data inside an XML doc as binary, 20 digits long, each representing a boolean value. <matrix> <resource type="single"> <map>10001010100011110000</map> <name>Resource Title</name> <url>http://www.yoursite.com&lt;/url&gt; </resource> </matrix> I am parsing this with jQuery and am cur...