Questions tagged [cmp]

cmp is a command line utility for computer systems that use Unix or a Unix-like operating system.It compares two files of any type and writes the results to the standard output

By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported.

Return values:

0 —> files are identical
1 —> files differ
2 —> inaccessible or missing argument

Read more

150 questions
0
votes
1 answer

How jump to Widget Activity of Android's Setting?

I want to click a button to jump to AppWidget of Android's Setting with intent or broadcast, but i don't find Intent.ACTION_XXX to Widget Activity.I try ComponentName but i don't know which package can complete this action. if intent is can't…
Vincent
  • 3
  • 2
0
votes
1 answer

EJB 2.1 and container managed persistence in websphere 8: Single object finder returned 2 objects

We are using EJB 2.1 with container managed persistence in IBM Websphere 8 and have the following problem: A single Object finder sometimes return 2 elements even though there is only one element the database for this search criteria. This happens…
0
votes
2 answers

Calling linux command cmp with C program

I'm trying to make a program which is getting 2 pathes for files to main, and calling linux' cmp command in order to compare them. If they equal, I want to return 2, and if they're different, 1. #include #include #include…
Jjang
  • 11,250
  • 11
  • 51
  • 87
0
votes
2 answers

'C' appearing as 2 different values?

I'm trying to compare 2 different char in assembly(calling assembly function in C program). One of the char belongs to a struct and the other is passed in when calling the function. struct node { void *previous; void *next; …
rlhh
  • 893
  • 3
  • 17
  • 32
0
votes
3 answers

Why is this CMP instruction failing?

I have the following code : CMP BYTE PTR [ESP+5],61 ; ESP is 0012F9AC JNZ SHORT .... The following is in the memory Address Data 0012F9AC 0012FA94 0012F9B0 61616161 0012F9B4 61616161 Now, the way I understand it is that it is comparing 0x61…
0
votes
1 answer

What happens if I have JPA and CMP in the same project?

It is possible to have EJB 2.X and EJB 3.X classes in the same project. And they should not be in the same EJB-jar. It means i can have ContainerMansgedPersistency(EJB2.x) and JPA parallely. Is it a problem? What happens if i use both of them in…
Kayser
  • 6,544
  • 19
  • 53
  • 86
-1
votes
1 answer

Perl: sort hash ref using multiple array ref values

I have a hash ref with values being an array ref. I would like to sort the hash using multiple values. For example: { 'ID' => ['Age', 'Name', 'Start-Date'] } I would like to sort by: 1) Age; then-by by 2) Start-Date (if Ages are equal). For…
h q
  • 1,168
  • 2
  • 10
  • 23
-1
votes
1 answer

compare columns from multiple files with bash command

I have several files, namely a.txt, b.txt, c.txt, d.txt, in the same format (3 columns, separated with tab). Let's take the first 3 lines of a.txt and b.txt for example: $head -3 a.txt id_1 59 4 id_4 89 43 id_5 8 90 $head -3 b.txt id_1 9 4 id_4 39…
Xiaokang
  • 331
  • 1
  • 11
-1
votes
2 answers

ARM Assembly - CMP wrong output

I'm working on a program in ARM assembly (Raspberry pi), but I have a problem. I have this code, but the lower part is always executing (skip$). mov r1, #3 mov r3, #4 add r2, r1, r3 bl Debug cmp r2, #0x0A ble skip$ mov r0, #10 sub r0, r0,…
-1
votes
3 answers

PHP sorting a multidimensional Array by 3 values

I want to sort a mulitdimensional array by the values position (can only be 1 or 0), the date and the time. The arrays with position = 1 should be first, and they should be sorted by date and time. The array with position = 0 should come after the…
Kable
  • 117
  • 5
  • 13
-1
votes
1 answer

Confusing add command in x86 assembly

I was looking through some code and found 2 lines that perplexed me: add -0x4(%esi,%ebx,4),%eax cmp %eax,(%esi,%ebx,4) I am accustomed to the standard add src,dst and cmp x1,x2 and I'm not really sure what these lines are actually doing. I…
Strogenstroff
  • 47
  • 1
  • 9
-2
votes
1 answer

How should I solve this c++ sorting problem

#include #include #include #include #include #include #include using namespace std; map m; vector, int>> v; vector,int>>…
-2
votes
1 answer

Assembly intel x86 - compare [] []

I'm trying to write simple assembly program, which takes 2 strings from command line and then counts occurrences of first one in the second one. For example: x="abc" y="abcabc abc". It should print 3. I can't compile this code, because of too many…
-2
votes
1 answer

Why was the carry flag set here?

I was wondering if anyone can give me some site with lots of practice with these flags, especially the carry and overflow flag. Anyways my question is this. I'm looking at lecture notes and I see for a 5-bit comparisons Cmp $12, $6 becomes 00110 -…
User
  • 1
  • 2
-3
votes
1 answer

will carry flag be set after cmp[.b] #4, #-1 ? [MSP430 16 bit]

[MSP430 16 bit] 0x437c mov[.b] #-1, r12 0x926c cmp[.b] #4, r12 0x2801 jlo 0xda36 Could anyone help me calculation (cmp[.b] #4, r12 ) with Binary? Example : r12-#4= 1111111111111111 - 0100 @@? I dont know how to calculation cmp with…
鍾豐吉
  • 11
  • 3
1 2 3
9
10