Click here to Skip to main content
16,005,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: dll Pin
Colin Angus Mackay6-Dec-05 1:51
Colin Angus Mackay6-Dec-05 1:51 
Questionalgorithm for 6 digits unique number Pin
Ronen Tidhar6-Dec-05 1:12
Ronen Tidhar6-Dec-05 1:12 
AnswerRe: algorithm for 6 digits unique number Pin
Colin Angus Mackay6-Dec-05 1:19
Colin Angus Mackay6-Dec-05 1:19 
AnswerRe: algorithm for 6 digits unique number Pin
J4amieC6-Dec-05 2:25
J4amieC6-Dec-05 2:25 
GeneralRe: algorithm for 6 digits unique number Pin
Ronen Tidhar7-Dec-05 1:07
Ronen Tidhar7-Dec-05 1:07 
GeneralRe: algorithm for 6 digits unique number Pin
Ronen Tidhar7-Dec-05 1:51
Ronen Tidhar7-Dec-05 1:51 
GeneralRe: algorithm for 6 digits unique number Pin
Dan Neely7-Dec-05 2:09
Dan Neely7-Dec-05 2:09 
GeneralRe: algorithm for 6 digits unique number Pin
Nick Hounsome8-Dec-05 22:40
Nick Hounsome8-Dec-05 22:40 
The simple way to work this is to store the last number given and 'lie' a bit if the requests for numbers come too frequently:

x = timeInMS/100;  // 6 digits 
if( x== last )
  ++x;
last = x;


This gaurantees uniqueness but will occasionally give the wrong time in circumstances that cannot be avoided

Note that if the ++x is common then want you want is impossible anyway.

P.S. I haven't used hex encoding in this but why stop at base16? Use base64 and get greater precision
QuestionAre parameter arrays CLS compliant? Pin
Nish Nishant6-Dec-05 1:02
sitebuilderNish Nishant6-Dec-05 1:02 
AnswerRe: Are parameter arrays CLS compliant? Pin
S. Senthil Kumar6-Dec-05 1:22
S. Senthil Kumar6-Dec-05 1:22 
GeneralRe: Are parameter arrays CLS compliant? Pin
Nish Nishant6-Dec-05 2:32
sitebuilderNish Nishant6-Dec-05 2:32 
QuestionDataTime Pin
papa19806-Dec-05 0:55
papa19806-Dec-05 0:55 
AnswerRe: DataTime Pin
Colin Angus Mackay6-Dec-05 1:17
Colin Angus Mackay6-Dec-05 1:17 
GeneralRe: DataTime Pin
papa19806-Dec-05 1:23
papa19806-Dec-05 1:23 
GeneralRe: DataTime Pin
papa19806-Dec-05 1:27
papa19806-Dec-05 1:27 
GeneralRe: DataTime Pin
Colin Angus Mackay6-Dec-05 1:44
Colin Angus Mackay6-Dec-05 1:44 
GeneralRe: DataTime Pin
papa19806-Dec-05 1:56
papa19806-Dec-05 1:56 
GeneralRe: DataTime Pin
Colin Angus Mackay6-Dec-05 2:11
Colin Angus Mackay6-Dec-05 2:11 
GeneralRe: DataTime Pin
papa19806-Dec-05 3:48
papa19806-Dec-05 3:48 
AnswerRe: DataTime Pin
albCode14-Dec-05 5:07
albCode14-Dec-05 5:07 
QuestionLogin page Pin
ambedkar6-Dec-05 0:32
ambedkar6-Dec-05 0:32 
AnswerRe: Login page Pin
MudkiSekhon6-Dec-05 0:58
MudkiSekhon6-Dec-05 0:58 
GeneralRe: Login page Pin
Colin Angus Mackay6-Dec-05 1:08
Colin Angus Mackay6-Dec-05 1:08 
GeneralRe: Login page Pin
MudkiSekhon6-Dec-05 1:21
MudkiSekhon6-Dec-05 1:21 
GeneralRe: Login page Pin
Colin Angus Mackay6-Dec-05 1:34
Colin Angus Mackay6-Dec-05 1:34 

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.