Re: Finer than a second.

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38779
interpreted = N
texte = Samuel Renkert wrote: > > >Samuel Renkert wrote: > >> > >> How can I determine time with finer gradations than a second? > >> > >> I am trying to easily sequence visitors to a website. Something > >> along the lines that I can > >> [search ...VisitedTimesort=1...] to see who visited first and so on. > >> I really need to *know* the order, it's not good enough to say these > >> 3 visited within the same second. I figure if I can measure time > > > with a fine enough gradation, I can cut down the collisions. > > > > My goal is to serve up and index.html that [includes] 1 of 3 different files. > > The first visitor gets file A. > The second gets file B. > The third gets file C. > The fourth gets file A. > If you merely want to ensure that each include file gets used the same number of times (i.e. banner ads), then I would recommend using [random] directly for this instead of hunting around for some other solution.[if [random]<34] [then]includeA.inc[/then] [else] [if [lastrandom]<67] [then]includeB.inc[/then] [else]includeC.inc[/else] [/if] [/else] [/if]There are also pre-packaged banner ad solutions available from other members on this list (I'll let them toot their own horns ;~).> >That said, [cart]'s of the same length are sortable as ASCII and I > >believe that [cart]'s should be monotonically increasing (even when > >considering varying length) when compared as ASCII. > > However, only > >Grant or one of the current programmers would know for sure. > > I am confused on this varying length part. As alphanumeric > comparisons on in a sense left justified so they sort weird if > they are not of the same length. > Take a look at your ShoppingCarts folder. Now that the Unix epoch time has rolled over, all my carts start with 100099* (prior to about 11:30 EDT) and 100100* after. So they do sort alpha order, from left to right. When I have seen varying length carts, it was only on the right side (i.e. they were longer than average). I assume this is some of the custom processing that WebCat does to ensure that carts are unique.Carts should sort in ASCII order, because they are based on # of seconds plus other stuff. This was not true over the break between before and after the epoch (when they went from 999* to 1000*). Going forward, you should be safe until 2038.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Finer than a second. (John Peacock 2001)
  2. Re: Finer than a second. (Samuel Renkert 2001)
  3. Re: Finer than a second. (John Peacock 2001)
  4. Finer than a second. (Samuel Renkert 2001)
Samuel Renkert wrote: > > >Samuel Renkert wrote: > >> > >> How can I determine time with finer gradations than a second? > >> > >> I am trying to easily sequence visitors to a website. Something > >> along the lines that I can > >> [search ...VisitedTimesort=1...] to see who visited first and so on. > >> I really need to *know* the order, it's not good enough to say these > >> 3 visited within the same second. I figure if I can measure time > > > with a fine enough gradation, I can cut down the collisions. > > > > My goal is to serve up and index.html that [includes] 1 of 3 different files. > > The first visitor gets file A. > The second gets file B. > The third gets file C. > The fourth gets file A. > If you merely want to ensure that each include file gets used the same number of times (i.e. banner ads), then I would recommend using [random] directly for this instead of hunting around for some other solution.[if [random]<34] [then]includeA.inc[/then] [else] [if [lastrandom]<67] [then]includeB.inc[/then] [else]includeC.inc[/else] [/if] [/else] [/if]There are also pre-packaged banner ad solutions available from other members on this list (I'll let them toot their own horns ;~).> >That said, [cart]'s of the same length are sortable as ASCII and I > >believe that [cart]'s should be monotonically increasing (even when > >considering varying length) when compared as ASCII. > > However, only > >Grant or one of the current programmers would know for sure. > > I am confused on this varying length part. As alphanumeric > comparisons on in a sense left justified so they sort weird if > they are not of the same length. > Take a look at your ShoppingCarts folder. Now that the Unix epoch time has rolled over, all my carts start with 100099* (prior to about 11:30 EDT) and 100100* after. So they do sort alpha order, from left to right. When I have seen varying length carts, it was only on the right side (i.e. they were longer than average). I assume this is some of the custom processing that WebCat does to ensure that carts are unique.Carts should sort in ASCII order, because they are based on # of seconds plus other stuff. This was not true over the break between before and after the epoch (when they went from 999* to 1000*). Going forward, you should be safe until 2038.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

anyone have an automated template encrypter? (2000) Fun with Dates - finally resolved but.... (1997) PIXO support (1997) OT: Safari/Mac - frames and iframes acting weird (2007) Searching multiple Databases (1997) Running a store on BOTH http and https (1998) Grep Master Needed (2003) Subtotal Taxabletotal Grandtotal **CART** (2005) Frames and WebCat (1997) Viewing old carts (was FEW QUESTIONS) (1997) WebSiphon and MGI links (2000) redirect not passing vars (2004) Show first 50 characters (2005) Re2: frames & carts (1997) Conveting Characters to Graphics (1997) Final invoice problems (1998) 2.0 Info (1997) Deleting Orders (1997) How far do [showif]s go? (1997) no [include]s with encryption? (1998)