I tossed out a tag, CF_UUID, available at the TagGallery, it does this...

> -----Original Message-----
> From: Scott Van Vliet [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 05, 2001 12:45 PM
> To:   Fusebox
> Subject:      RE: Unique Random Numbers
> 
> perhaps the method offers a numerical
> solution for unique identification (as
> opposed to the hex identifier returned
> by CreateUUID())?
> 
> 
> --> scott van vliet
> <-- senior web engingeer
>     juxt interactive
>     949<>752<>5898<>202
>     [EMAIL PROTECTED]
>     www.juxtinteractive.com
> 
>     "In uniqueness is the preservation
>      of mankind..." - Greg Graffin
> 
> 
> 
> 
> -----Original Message-----
> From: Ken Beard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 05, 2001 3:50 PM
> To: Fusebox
> Subject: RE: Unique Random Numbers
> 
> 
> is there a problem with the createUUID() function in cf?
> 
> At 11:33 AM 6/5/01 -0700, you wrote:
> >For you uniqueness freaks out there, combine GetTickCount() with the tips
> >below for a super-guaranteed random number.
> >
> >NAT
> >
> > > -----Original Message-----
> > > From: Matthew J. Vecera [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 05, 2001 9:00 AM
> > > To: Fusebox
> > > Subject: Unique Random Numbers
> > >
> > >
> > > I feel a little amateurish dishing this one up - but I really dig this
> > > little technique.  Somehow it satisfies my skepticism of Unique Key
> > > Generators  -- and it keeps things numeric.
> > >
> > > Matthew
> > >
> > > http://www.builder.com/Programming/ScriptMagic/ss01g.html
> > >
> > > ColdFusion Tips
> > >    Generate Unique Random Numbers
> > >
> > >    By Rob Bilson and Mike Van Hoozer
> > >    (6/30/98)
> > >
> > >    ColdFusion's RAND, RANDRANGE, and RANDOMIZE functions can be used
> to
> > > generate random numbers, but none of them
> > >    addresses the need for generating unique random numbers. Unique
> random
> > > numbers have many uses, especially in user
> > >    authentication and identification. One of the easiest ways to
> create
> a
> > > unique random number in ColdFusion is to combine the
> > >    RAND function with a time and date stamp.
> > >
> > >    Using the time and date stamp ensures that even if the same random
> > > numbers are generated--and you have a better chance of
> > >    winning the lottery than of seeing that happen--the time and
> > > date stamp
> > > will be different:
> > >
> > >    <!--- Assign the current date and time to a variable. --->
> > >    <CFSET tdstamp="#DateFormat(Now(),'mmddyyyy')
> > >    ##TimeFormat(Now(),'hhmmss')#">
> > >    <!--- Create a random number. --->
> > >    <CFSET randomnum1=RAND()*100000000>
> > >    <!--- Create another random number. --->
> > >    <CFSET randomnum2=RAND()*100000000>
> > >    <!--- Concatenate the first random number, the time and date
> > > stamp, and
> > > the second random number. --->
> > >    <CFSET uniquenumber="#randomnum1##tdstamp
> > >    ##randomnum2#">
> > >
> > >    <!--- Output the unique random number. --->
> > >    <CFOUTPUT>
> > >    Unique Random Number: #UniqueNumber#
> > >    </CFOUTPUT>
> > >
> > >
> > > Archives: http://www.mail-archive.com/[email protected]/
> > > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to