Re: Finer than a second.

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38775
interpreted = N
texte = >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.I originally planed to use [cart] and some sort of db.Msg.db AB MSG LastUsed A Bland.inc ? B Sad.inc ? C Happy.inc ?So getting the next page becomes trivial, select the lowest LastUsed value, and set that records LastUsed to [cart].For [cart] to work for this purpose, it needs to be of consistent length (because 9 > 10 alphanumerically speaking) and ever-increasing (or monotonically increasing). Some other value would also be useful, if I could generate it, just so long as its always increasing.>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.1 11 123 2 21 3 4If I could right justify the values, then they would sort correctly, alphanumerically. (0's are for formatting only)001 002 003 004 011 021 123So what exactly do you mean? And can I change the way webcat sorts?> > >> I know I could do it with a small database that just increments a >> number for each page load. But I would like the solution to be as >> self contained as possible. > >This will introduce race conditions unless you use locking. This is >exactly what [cart] was invented to deal with. >Hmm, so then, any suggestions for my goal?Thanks Sam------------------------------------------------------------- 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: >> >> 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.I originally planed to use [cart] and some sort of db.Msg.db AB MSG LastUsed A Bland.inc ? B Sad.inc ? C Happy.inc ?So getting the next page becomes trivial, select the lowest LastUsed value, and set that records LastUsed to [cart].For [cart] to work for this purpose, it needs to be of consistent length (because 9 > 10 alphanumerically speaking) and ever-increasing (or monotonically increasing). Some other value would also be useful, if I could generate it, just so long as its always increasing.>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.1 11 123 2 21 3 4If I could right justify the values, then they would sort correctly, alphanumerically. (0's are for formatting only)001 002 003 004 011 021 123So what exactly do you mean? And can I change the way webcat sorts?> > >> I know I could do it with a small database that just increments a >> number for each page load. But I would like the solution to be as >> self contained as possible. > >This will introduce race conditions unless you use locking. This is >exactly what [cart] was invented to deal with. >Hmm, so then, any suggestions for my goal?Thanks Sam------------------------------------------------------------- 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/ Samuel Renkert

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:

[random] only for 1-100??? (1997) [WebDNA] [sendmail] inside a [founditems] loop ... please comment on parameters. (2009) Three new problems, maybe a fourth (1997) Un[url]ize (1999) Weird error/limit - something amiss? (1997) Credit back woes (2000) Announcement-WebCatalog 2.0 Released (1997) [OT] Linux -> Winderz (2005) Migrating to NT (1997) [OT] See Flash? (2003) SMSI: WebDNA Versions? (2002) WCS Newbie question (1997) File Upload and Platform (2001) Ampersand (1997) Problems with [Applescript] (1997) WebCatalog can't find database (1997) SM: Update on this please: Paymethod question (1999) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) protect tag on NT IIS (1997) Options for http uploading of files (1999)