|
Yeah you're right...ok...as you see in the input file , the values in the first line ais like this : 3 0 0 9 0 0 2 0 0
it means that in array (matrix[][]) the values should be like this :
matrix[0][0]=3
matrix[0][1]=0
matrix[0][2]=0
matrix[0][3]=9
.
.
.
and so on...until matrix[8][8]=0...(as we have in input file)
but what I see is like this :
matrix[0][0]=51 !!!!!
matrix[0][1]=32...
matrix[0][2]=48...
and so on until the last one....and the interesting thing is that the size of the matrix that I defined in my code is matrix[9][9]...but when I debug the code it's like that :
matrix[9][17]!!!! I mean the last element of matrix is in matrix[8][16] with "48" for the value...
I hope that I've explained clearly...if it's not obvious tell me to explain more...
|
|
|
|
|
Your counter is being increment by 1 too many because you increment it even when trying to read beyond the last line; you should only increment it when you get a complete line of values. You are setting the number of columns to the length of the final line read in, but this is wrong as there are more characters than actual digits in the line. And finally, you are setting the values in your matrix to each successive character in the input line, rather than tokenising the string into the successive digits and converting them to integers.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Wowww...Thank you Mr.Richard
|
|
|
|
|
Can I use a female voice in my Java Programs and how do I use it?
CodersAfrica
|
|
|
|
|
Take a look at these links[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Complicated.
Kidnapping is not common tolerated.
You could ask a woman to record some for you, or buy some sounds online.
What kind of sounds are you looking for?
|
|
|
|
|
This is an interesting question. Couldn't you download and utilize a type of voice change software?
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:37am.
|
|
|
|
|
in j2me i made click counter but loop in run only 1st time and count only 1 and then it is not count,either i press the button ?
|
|
|
|
|
interesting. Now - would you mind showing some code so we know where you ... well, lets say "spoiled it"?
|
|
|
|
|
Hello J2me,
If you post your code - or section of code - that is giving you trouble. Perhaps, we'd be able to help you.
With Kind Regards,
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 8:37am.
|
|
|
|
|
How to parse data to validation.txt when I have type=<value_type>;value=<value>, possible entering for value_type are text and numbers, depending from data that is in value, validation for each data type
|
|
|
|
|
Your question is far from clear, but parsing means splitting your data into its component parts and taking actions based on the values of the different parts. You probably need to use some String functions[^] and some Stream or File handling[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Salam,
i am studing java.. i am making inventory system . here i need to take input from barcode reader... help me to figure it out.
send me any link if you have for complete guidness.
|
|
|
|
|
You need to read the instructions that come with the barcode reader. You will find that all barcode readers send the data in standard character format as if typed at the keyboard, so the only issue is how you control the reader itself, and that varies from model to model.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
thanks but how can i connect my java code with barcode reader...
|
|
|
|
|
That depends on how the reader is connected to your system, and how it sends the information when it reads the barcode. As I said before, you need to read the documentation as we have no information on the device that you are using.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi All,
[CODE]
// Signature part R:
0B9E 77E7 6D7E EA87 4D6D F987 AE3C E6D7 5BCD FEFB.
// Signature part S:
65A2 17FF 1596 2356 E3BA 4692 9478 AC79 D801 B337.
// Signature part R:
8135 C560 7FC0 6F82 B886 FAEF 5158 C18C 2D79 17AB.
// Signature part S:
28A8 4825 B530 DE20 C571 9CDB 76D0 9489 EB7D 3149.
// BIG p
FCA6 82CE 8E12 CABA 26EF CCF7 110E 526D B078 B05E DECB CD1E B4A2 08F3 AE16 17AE 01F3 5B91 A47E 6DF6 3413 C5E1 2ED0 899B CD13 2ACD 50D9 9151 BDC4 3EE7 3759 2E17.
// BIG q
962E DDCC 369C BA8E BB26 0EE6 B6A1 26D9 346E 38C5.
// BIG g
6784 71B2 7A9C F44E E91A 49C5 147D B1A9 AAF2 44F0 5A43 4D64 8693 1D2D 1427 1B9E 3503 0B71 FD73 DA17 9069 B32E 2935 630E 1C20 6235 4D0D A20A 6C41 6E50 BE79 4CA4.
// BIG y
4436 34C0 5D1C B536 8026 142B 3D6D 09DA D3B1 CD2C F4E9 B7AD B618 5466 51FC 2D54 8EB1 2394 30F4 323F 7240 E55A D44C 380B 13FB 7978 B825 0B44 2BD5 0ED3 A58B 9E5F.
[CODE]
Above signature in the bold must be validated using below public key :
[CODE]
// BIG p
FCA6 82CE 8E12 CABA 26EF CCF7 110E 526D B078 B05E DECB CD1E B4A2 08F3 AE16 17AE 01F3 5B91 A47E 6DF6 3413 C5E1 2ED0 899B CD13 2ACD 50D9 9151 BDC4 3EE7 3759 2E17.
// BIG q
962E DDCC 369C BA8E BB26 0EE6 B6A1 26D9 346E 38C5.
// BIG g
6784 71B2 7A9C F44E E91A 49C5 147D B1A9 AAF2 44F0 5A43 4D64 8693 1D2D 1427 1B9E 3503 0B71 FD73 DA17 9069 B32E 2935 630E 1C20 6235 4D0D A20A 6C41 6E50 BE79 4CA4.
// BIG y
4436 34C0 5D1C B536 8026 142B 3D6D 09DA D3B1 CD2C F4E9 B7AD B618 5466 51FC 2D54 8EB1 2394 30F4 323F 7240 E55A D44C 380B 13FB 7978 B825 0B44 2BD5 0ED3 A58B 9E5F.
[CODE]
In the above BIG y is the public key and we must validate the signature with this public key(this signature will be different each time we sign).
Can any one please suggest
|
|
|
|
|
Hey,
We found the solution i.e., we were trying to sign unencrypted file but we have to sign encrypted file.
Now we are able to validate our signature with our own public key.
|
|
|
|
|
Hi,
Please any one suggest, while signing with the same key I'm getting different signature each time,I don't whether it is right?
Thanks in advance
|
|
|
|
|
Why have you created a new CodeProject id just to ask the same question?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I have a key pair(my own public key and private key).
I have signed my data with my private key. when i am trying to sign same data multiple times with private key, its generarting different signatures like
My Private Key :
// BIG p
FCA6 82CE 8E12 CABA 26EF CCF7 110E 526D B078 B05E DECB CD1E B4A2 08F3 AE16 17AE 01F3 5B91 A47E 6DF6 3413 C5E1 2ED0 899B CD13 2ACD 50D9 9151 BDC4 3EE7 3759 2E17.
// BIG q
962E DDCC 369C BA8E BB26 0EE6 B6A1 26D9 346E 38C5.
// BIG g
6784 71B2 7A9C F44E E91A 49C5 147D B1A9 AAF2 44F0 5A43 4D64 8693 1D2D 1427 1B9E 3503 0B71 FD73 DA17 9069 B32E 2935 630E 1C20 6235 4D0D A20A 6C41 6E50 BE79 4CA4.
// BIG x
06CE 2BF2 3F33 FDCD 3F22 1301 4F56 1152 69F6 FA4D.
In the above it uses the
// BIG x
06CE 2BF2 3F33 FDCD 3F22 1301 4F56 1152 69F6 FA4D.
parameter as private key to sign.
Sign File when i have signed for the first time :
493C F96C F7DA D6A5 75A3 BC4C 4F30 50A8 6C48 B213.
3EDB 39C8 3711 3E68 13F0 C14D 1264 D189 4B6F 014E.
Sign File when i have signed for the second time :
764E 5BC4 C7F7 B8BC 1A25 D4F3 A565 FCAE 47D9 8BC9.
29EF 30C4 6483 904D 9A6B 53A1 4550 AD5B A71C 33E5.
Thanks in advance.
|
|
|
|
|
Hey,
We found the solution. While signing same data multiple times with the same key will produce different signatures.
|
|
|
|
|
Hi All,
I'm getting different signature for same data while signing with the same key multiple times.
Can any one suggest whether it is right?
Thanks in advance.
|
|
|
|
|
syam071 wrote: Can any one suggest whether it is right? What is right, what signing? Please provide sufficient information for people to understand what your problem is, maybe a short extract of the failing code would help.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I am coding in Java 6 on a computer with Windows XP.
PrintServiceLookup.lookupPrintServices works fine and returns an array with all printers in my network I have installed.
PrintServiceLookup.lookupMultiDocPrintServices, however returns an empty array and I have seen a couple of other ppl (googled) not getting anything more.
Does anyone know if Java (6) for Windows XP is shipped with support for MultiDocPrintServices?
modified 6-Dec-12 9:20am.
|
|
|
|