Auto Generator
Bill Vermillion
fp at wjv.com
Wed Mar 24 16:15:36 PST 2004
On Wed, Mar 24, 2004 at 04:41:43PM -0500, John Esak thus spoke:
> Well,
> I was assuming you could prepend or add some alpha to a random
> number. As for being unique. No way with only 8 characters.
> Well, you know what I mean.
> The rand() fuctiion in any language never gaurantees unique'ness. :-)
It's not uniqueness that is sought it is randomness.
However the random functions in the current generations of operating
systems have gone much further in in being able to generate
unpredicatable random number by using unpredictable events to
generate seeds. In BSD the interupts are used to randomize
'the pool of entropy' in the kernel.
The rndcontrol program is used to select which interupts you wish
to use for randomization. You can use a combination of many so
interupts generated from keyboard, ethernet devices, or any other
device, are used.
It's about the most unpredictable way that I've run across.
In filePro I was using a random function and had the limits set
on the number of records in a file. The idea was to select a
random number of records to compile for a report.
I'd set the top to be the maxium number of records, and then use
the function to select as many as the group required - typically
2-300 hundred out of about 50,000 sets of student data.
I did keep a running record of numbers generated so that no record
would be included more than once in a the report.
> John
>
>
> > -----Original Message-----
> > From: filepro-list-bounces at lists.celestial.com
> > [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of DataDoIt
> > Sent: Wednesday, March 24, 2004 4:03 PM
> > To: filepro-list at seaslug.org
> > Subject: RE: Auto Generator
> >
> >
> > Does RAND allow for alpha characters? Online help shows it only works for
> > numbers.
> >
> > Is it possible to tell RAND to not pull numbers greater than, say, 36?
> > (0-9, a-z) I could then decipher if it's a number greater than 9, pull a
> > corresponding alpha character (10 = a, 11 = b, etc.).
> >
> > Am I making this more complicated than it has to be?
> >
> > -Mike R.
> >
> > |-----Original Message-----
> > |From: John Esak [mailto:john at valar.com]
> > |Sent: Wednesday, March 24, 2004 3:42 PM
> > |To: filepro at datadoit.com
> > |Cc: filePro mailing list
> > |Subject: RE: Auto Generator
> > |
> > |
> > |I did back in the late 80's on an NCR system... but I could
> > |never find it
> > |now. However, it would only be a line or two of code using rand().
> > |
> > |John Esak
> > |
> > |
> > |> -----Original Message-----
> > |> From: filepro-list-bounces at lists.celestial.com
> > |> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf
> > |Of DataDoIt
> > |> Sent: Wednesday, March 24, 2004 2:38 PM
> > |> To: filepro-list at seaslug.org
> > |> Subject: Auto Generator
> > |>
> > |>
> > |> Has anyone ever created an auto password generator from filePro?
> > |> Something
> > |> that will create a random 8 digit alphanumeric passcode, yet
> > |be unique.
> > |>
> > |> -Mike R.
> > |>
> > |>
> > |> _______________________________________________
> > |> Filepro-list mailing list
> > |> Filepro-list at lists.celestial.com
> > |> http://mailman.celestial.com/mailman/listinfo/filepro-list
> > |
> > |
> >
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Bill Vermillion - bv @ wjv . com
More information about the Filepro-list
mailing list