Unique Id Generation
i have 2 follow 2 things while generating a unique id .
1.) it should be in short range (1 to 32,767)
2.) without refering to previous generated id's i have to generate the other id's
Do any one have idea or clue to do this ???
I can satisfy 2) but not 1).
var uniqueId = new Date().getTime()
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
thanks . i am also trying using date object only . but i need 2 satisfy both condns ...
currentTime.getSeconds() will always return the unique id within a miniute (0-59 - With in short range)
currentTime.getSeconds()+""+currentTime.getMinutes()) will always return a unique id within a hour .(0-5959 With in short range)
currentTime.getSeconds()+""+currentTime.getMinutes()+""++currentTime.getHours()) will always return a unique id within a day .(0-595923 NOT With in short range)
so here only my problem arises . if 3rd condn satisfies i will b done . in this way i dont need to store the id's and refer it back . can u help me something similar to this .
waiting for ur reply
Thanks & Regards ,
Sounds like a tough call,I have a feeling that other then storing the values in an array you will find it hard to get a solution
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)