Click here to Skip to main content
15,885,365 members
Home / Discussions / C#
   

C#

 
Questiondrag and drop picture box [modified] Pin
rzvme6-Nov-06 1:16
rzvme6-Nov-06 1:16 
QuestionHow to implement the style of a button Pin
quiteSmart6-Nov-06 1:02
quiteSmart6-Nov-06 1:02 
AnswerRe: How to implement the style of a button Pin
Insincere Dave6-Nov-06 1:38
Insincere Dave6-Nov-06 1:38 
GeneralRe: How to implement the style of a button Pin
quiteSmart6-Nov-06 3:00
quiteSmart6-Nov-06 3:00 
GeneralRe: How to implement the style of a button Pin
Insincere Dave6-Nov-06 9:29
Insincere Dave6-Nov-06 9:29 
Questionhow to play video from stream ? Pin
hdv2126-Nov-06 0:58
hdv2126-Nov-06 0:58 
QuestionDirectShow Capture Pin
stricher_085-Nov-06 23:54
stricher_085-Nov-06 23:54 
QuestionMassive Headache with getting remainder of a sum. [modified] Pin
Gazlar835-Nov-06 23:52
Gazlar835-Nov-06 23:52 
Ok im trying to create a barcode program that will make barcodes using Code128A. Firstly i downloaded a free program that can already make these barcodes, just so that i can compare my codes to for checking purposes.

To cut along story short, when i generate CODE128A barcode i have to do a checksum. The checksum is done by looking up certain values of the encoded data and dividing it by 103. The checksum is the remainder of that.

So for example my value = 1265. I have to do 1265/103 and the remainder of that equals the checksum. That checksum is then encoded in the barcode. Here is my problem. When i do 1265%103 in c#, i get an answer of 29. But the program i downloaded says its 28! My barcode scanner also says its 28 as it dosen't read my code but does read the one generate by this program. What i did was make a function that allowed me to change the way it rounded the remainder. Now i can get 28.

I then made another barcode. This time i was working with the value of 1215, so its 1215/103. My program gave me a remainder of 79. Even doing 1215%103 gives me that but this barcode program says its 82!!!

How the hell did it get that?

At this point i was getting mad and confused. Then i thought i would do it on paper the old fashon way and i got this.

0011 rm82
103)1215

So i changed my function to work it out as above. My problem now is that my orginal question 1265/103 gives me 29 again. Does anyone know what i can do to fix this problem?


-- modified at 6:29 Monday 6th November, 2006
AnswerRe: Massive Headache with getting remainder of a sum. Pin
Guffa6-Nov-06 0:55
Guffa6-Nov-06 0:55 
AnswerRe: Massive Headache with getting remainder of a sum. Pin
Luc Pattyn6-Nov-06 6:57
sitebuilderLuc Pattyn6-Nov-06 6:57 
Question(220v Relay), please help Pin
Muammar©5-Nov-06 23:42
Muammar©5-Nov-06 23:42 
AnswerRe: (220v Relay), please help Pin
coolestCoder5-Nov-06 23:48
coolestCoder5-Nov-06 23:48 
GeneralRe: (220v Relay), please help Pin
Muammar©7-Nov-06 20:57
Muammar©7-Nov-06 20:57 
AnswerRe: (220v Relay), please help Pin
cjengler6-Nov-06 0:06
cjengler6-Nov-06 0:06 
GeneralRe: (220v Relay), please help Pin
Muammar©7-Nov-06 20:54
Muammar©7-Nov-06 20:54 
GeneralRe: (220v Relay), please help Pin
Guffa6-Nov-06 1:15
Guffa6-Nov-06 1:15 
QuestionUse Style Builder dialog box? Pin
Gywox5-Nov-06 23:35
Gywox5-Nov-06 23:35 
Questionbackgroundworker Pin
Yustme5-Nov-06 23:24
Yustme5-Nov-06 23:24 
AnswerRe: backgroundworker Pin
mertkan656-Nov-06 4:27
mertkan656-Nov-06 4:27 
GeneralRe: backgroundworker Pin
Yustme6-Nov-06 5:11
Yustme6-Nov-06 5:11 
AnswerRe: backgroundworker Pin
Eric Dahlvang6-Nov-06 5:09
Eric Dahlvang6-Nov-06 5:09 
GeneralRe: backgroundworker Pin
Yustme6-Nov-06 10:12
Yustme6-Nov-06 10:12 
AnswerRe: backgroundworker Pin
mertkan656-Nov-06 20:46
mertkan656-Nov-06 20:46 
QuestionTravelling Salesman Problem Pin
and_reas5-Nov-06 23:14
and_reas5-Nov-06 23:14 
AnswerRe: Travelling Salesman Problem Pin
ednrgc6-Nov-06 3:52
ednrgc6-Nov-06 3:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.