This is a multi-part message in MIME format.

------=_NextPart_000_0182_01C02306.74F3E210
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

RE: [CF-Talk] Random Images-Resources for Information?Use the randomize()
function to seed the rand number generator.  Page 489 of the CF 4.5 language
reference manual.

<cfscript>
randomize(timeformat(now(),"SSHHMM"));
</cfscript>

Just to put an integer in as the seed value.  The randomize() function
returns a number between 0 and 1 but it is not "random" according to the
docs.

There are similar functions in other languages (basic, c, etc.)

DC
-------------------
David E. Crawford
Director, Internet Development
Yale Security Group, Inc.

  -----Original Message-----
  From: Mark Warrick [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, September 20, 2000 11:15
  To: [EMAIL PROTECTED]
  Subject: RE: [CF-Talk] Random Images-Resources for Information?


  Curious. What do you mean by seed?

  --------------------------------------------------------------
  Mark Warrick
  Phone: (714) 547-5386
  Efax.com Fax: (801) 730-7289
  Personal Email: [EMAIL PROTECTED]
  Personal URL: http://www.warrick.net
  Business Email: [EMAIL PROTECTED]
  Business URL: http://www.fusioneers.com
  ICQ: 346566
  --------------------------------------------------------------



  > -----Original Message-----
  > From: Jim McAtee [mailto:[EMAIL PROTECTED]]
  > Sent: Wednesday, September 20, 2000 3:01 AM
  > To: [EMAIL PROTECTED]
  > Subject: Re: [CF-Talk] Random Images-Resources for Information?
  >
  >
  > Depends what you're thinking when you say random.  If you mean calling
  > the function 7 times always pulls up 7 different numbers, then that is
  > NOT a random sequence.  By chance (err... 'randomness') you could
  > conceivably pull up the same number 7 times in a row (or a hundred times
  > in a row).  You'd sit there and say "This isn't random", but it's just a
  > 'streak' of good/bad/neither luck that this strange sequence ocurred.
  >
  > One other thing, mostly unrelated to the above.  The way computers
  > usually generate random numbers is by pulling numbers out of a large,
  > stored table (containing, you guessed it, random numbers).  You should
  > always seed the random number generator before you use it the first
  > time, so that the sequence doesn't always start in the same place within
  > the table.  If you don't do this, you may notice the same sequence of
  > numbers every time the program runs.
  >
  > Jim
  >
  >
  > -----Original Message-----
  > From: Les Mizzell <[EMAIL PROTECTED]>
  > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
  > Date: Wednesday, September 20, 2000 3:35 AM
  > Subject: RE: [CF-Talk] Random Images-Resources for Information?
  >
  >
  > >Thanks - will try this and see what happens.
  > >
  > >What nobody has told me yet though...is WHY *DOESN'T* "<cfparam
  > >name="imageswap" default="#randrange(1,7)#">" return 1 through 7
  > randomly?
  > >
  > >Les Mizzell
  > >***********
  > >Some people say I'm too apathetic.
  > >But why should I care?
  >
  >
  > ------------------------------------------------------------------
  > ------------
  > Archives: http://www.mail-archive.com/[email protected]/
  > To Unsubscribe visit
  > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
  _talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

  --------------------------------------------------------------------------
----
  Archives: http://www.mail-archive.com/[email protected]/
  To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


------=_NextPart_000_0182_01C02306.74F3E210
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [CF-Talk] Random Images-Resources for =
Information?</TITLE>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3018.900" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D815542213-20092000>Use=20
the randomize() function to seed the rand number generator.&nbsp; Page =
489 of=20
the CF 4.5 language reference manual.&nbsp; </SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000>&lt;cfscript&gt;</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000>randomize(timeformat(now(),"SSHHMM"));</SPAN><=
/FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000>&lt;/cfscript&gt;</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D815542213-20092000>Just=20
to put an integer in as the seed value.&nbsp; The randomize() function =
returns a=20
number between 0 and 1 but it is not "random" according to the=20
docs.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D815542213-20092000>There=20
are similar functions in other languages (basic, c, =
etc.)</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D815542213-20092000>DC</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D815542213-20092000>
<P><FONT size=3D2>-------------------<BR>David E. Crawford<BR>Director, =
Internet=20
Development<BR>Yale Security Group, Inc. </FONT></P></SPAN></FONT></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Mark Warrick=20
  [mailto:[EMAIL PROTECTED]]<BR><B>Sent:</B> Wednesday, September 20, =
2000=20
  11:15<BR><B>To:</B> [EMAIL PROTECTED]<BR><B>Subject:</B> RE: =
[CF-Talk]=20
  Random Images-Resources for Information?<BR><BR></DIV></FONT>
  <P><FONT size=3D2>Curious. What do you mean by seed?</FONT> </P>
  <P><FONT=20
  =
size=3D2>--------------------------------------------------------------</=
FONT>=20
  <BR><FONT size=3D2>Mark Warrick</FONT> <BR><FONT size=3D2>Phone: (714) =

  547-5386</FONT> <BR><FONT size=3D2>Efax.com Fax: (801) 730-7289</FONT> =
<BR><FONT=20
  size=3D2>Personal Email: [EMAIL PROTECTED]</FONT> <BR><FONT =
size=3D2>Personal URL:=20
  <A href=3D"http://www.warrick.net" =
target=3D_blank>http://www.warrick.net</A>=20
  </FONT><BR><FONT size=3D2>Business Email: [EMAIL PROTECTED]</FONT> =
<BR><FONT=20
  size=3D2>Business URL: <A href=3D"http://www.fusioneers.com"=20
  target=3D_blank>http://www.fusioneers.com</A></FONT> <BR><FONT =
size=3D2>ICQ:=20
  346566</FONT> <BR><FONT=20
  =
size=3D2>--------------------------------------------------------------</=
FONT>=20
  </P><BR>
  <P><FONT size=3D2>&gt; -----Original Message-----</FONT> <BR><FONT =
size=3D2>&gt;=20
  From: Jim McAtee [<A=20
  =
href=3D"mailto:[EMAIL PROTECTED]">mailto:[EMAIL PROTECTED]<=
/A>]</FONT>=20
  <BR><FONT size=3D2>&gt; Sent: Wednesday, September 20, 2000 3:01 =
AM</FONT>=20
  <BR><FONT size=3D2>&gt; To: [EMAIL PROTECTED]</FONT> <BR><FONT =

  size=3D2>&gt; Subject: Re: [CF-Talk] Random Images-Resources for=20
  Information?</FONT> <BR><FONT size=3D2>&gt; </FONT><BR><FONT =
size=3D2>&gt;=20
  </FONT><BR><FONT size=3D2>&gt; Depends what you're thinking when you =
say=20
  random.&nbsp; If you mean calling</FONT> <BR><FONT size=3D2>&gt; the =
function 7=20
  times always pulls up 7 different numbers, then that is</FONT> =
<BR><FONT=20
  size=3D2>&gt; NOT a random sequence.&nbsp; By chance (err... =
'randomness') you=20
  could</FONT> <BR><FONT size=3D2>&gt; conceivably pull up the same =
number 7 times=20
  in a row (or a hundred times</FONT> <BR><FONT size=3D2>&gt; in a =
row).&nbsp;=20
  You'd sit there and say "This isn't random", but it's just a</FONT> =
<BR><FONT=20
  size=3D2>&gt; 'streak' of good/bad/neither luck that this strange =
sequence=20
  ocurred.</FONT> <BR><FONT size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; =
One other=20
  thing, mostly unrelated to the above.&nbsp; The way computers</FONT> =
<BR><FONT=20
  size=3D2>&gt; usually generate random numbers is by pulling numbers =
out of a=20
  large,</FONT> <BR><FONT size=3D2>&gt; stored table (containing, you =
guessed it,=20
  random numbers).&nbsp; You should</FONT> <BR><FONT size=3D2>&gt; =
always seed the=20
  random number generator before you use it the first</FONT> <BR><FONT=20
  size=3D2>&gt; time, so that the sequence doesn't always start in the =
same place=20
  within</FONT> <BR><FONT size=3D2>&gt; the table.&nbsp; If you don't do =
this, you=20
  may notice the same sequence of</FONT> <BR><FONT size=3D2>&gt; numbers =
every=20
  time the program runs.</FONT> <BR><FONT size=3D2>&gt; </FONT><BR><FONT =

  size=3D2>&gt; Jim</FONT> <BR><FONT size=3D2>&gt; </FONT><BR><FONT =
size=3D2>&gt;=20
  </FONT><BR><FONT size=3D2>&gt; -----Original Message-----</FONT> =
<BR><FONT=20
  size=3D2>&gt; From: Les Mizzell &lt;[EMAIL PROTECTED]&gt;</FONT> =
<BR><FONT=20
  size=3D2>&gt; To: [EMAIL PROTECTED]=20
  &lt;[EMAIL PROTECTED]&gt;</FONT> <BR><FONT size=3D2>&gt; Date: =

  Wednesday, September 20, 2000 3:35 AM</FONT> <BR><FONT size=3D2>&gt; =
Subject:=20
  RE: [CF-Talk] Random Images-Resources for Information?</FONT> =
<BR><FONT=20
  size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; </FONT><BR><FONT =
size=3D2>&gt;=20
  &gt;Thanks - will try this and see what happens.</FONT> <BR><FONT =
size=3D2>&gt;=20
  &gt;</FONT> <BR><FONT size=3D2>&gt; &gt;What nobody has told me yet =
though...is=20
  WHY *DOESN'T* "&lt;cfparam</FONT> <BR><FONT size=3D2>&gt; =
&gt;name=3D"imageswap"=20
  default=3D"#randrange(1,7)#"&gt;" return 1 through 7</FONT> <BR><FONT=20
  size=3D2>&gt; randomly?</FONT> <BR><FONT size=3D2>&gt; &gt;</FONT> =
<BR><FONT=20
  size=3D2>&gt; &gt;Les Mizzell</FONT> <BR><FONT size=3D2>&gt;=20
  &gt;***********</FONT> <BR><FONT size=3D2>&gt; &gt;Some people say I'm =
too=20
  apathetic.</FONT> <BR><FONT size=3D2>&gt; &gt;But why should I =
care?</FONT>=20
  <BR><FONT size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; =
</FONT><BR><FONT=20
  size=3D2>&gt;=20
  =
------------------------------------------------------------------</FONT>=
=20
  <BR><FONT size=3D2>&gt; ------------</FONT> <BR><FONT size=3D2>&gt; =
Archives: <A=20
  href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>&gt; To Unsubscribe visit </FONT><BR><FONT =
size=3D2>&gt; <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf</A></FONT>=20
  <BR><FONT size=3D2>_talk or send a message to =
[EMAIL PROTECTED]=20
  with 'unsubscribe' in the body.</FONT> </P>
  <P><FONT=20
  =
size=3D2>----------------------------------------------------------------=
--------------</FONT>=20
  <BR><FONT size=3D2>Archives: <A=20
  href=3D"http://www.mail-archive.com/[email protected]/"=20
  =
target=3D_blank>http://www.mail-archive.com/[email protected]/</A=
></FONT>=20
  <BR><FONT size=3D2>To Unsubscribe visit <A=20
  =
href=3D"http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&amp;body=3D=
lists/cf_talk"=20
  =
target=3D_blank>http://www.houseoffusion.com/index.cfm?sidebar=3Dlists&am=
p;body=3Dlists/cf_talk</A>=20
  or send a message to [EMAIL PROTECTED] with =
'unsubscribe' in=20
  the body.</FONT></P></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0182_01C02306.74F3E210--

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to