Passing a timestamp to javascript? Use this to convert it to a Javascript date object:
`var timeStamp = 10000;
var theDate = new Date(timeStamp * 1000);
var dateString = theDate.toGMTString();
`
Passing a timestamp to javascript? Use this to convert it to a Javascript date object:
`var timeStamp = 10000;
var theDate = new Date(timeStamp * 1000);
var dateString = theDate.toGMTString();
`
I don’t want to point any fingers, but the [official Google response to the Belgian courts](http://googleblog.blogspot.com/2007/02/about-copiepresse-decision.html) reaffirmation of their early ruling has an interesting term, “indexation.” This may be an [indexical](http://en.wikipedia.org/wiki/Indexicality) term that has different meaning in this context. I may have just misindexstood though.
In other words, tech companies should have tech people proof press releases. ;)
It amazes me to see search pages that so marginalize the actual results. In this example, USA Today’s “web search” (actually powered by Yahoo) takes the cake by allocating a mere 659×101 tall area for the results, assuming a window size of 1024×768. That’s 66,559 out of the 786,432 pixels on the page or just under 8.5% of the real estate.
So, a visitor searching for [custom t-shirts](http://search.usatoday.com/search/yahoo/search.aspx?kw=site%3Agetyourshirts.com+custom+t-shirts) is going to see a page like this (I’ve highlighted where the organic SERPs show up):
I prefer a search engine result page that is simple and puts the results first. Here’s the site search at GetYourShirts.com for the same [t-shirt query](http://www.getyourshirts.com/search/custom+t-shirts-1.html). Of course, we won’t get into a discussion comparing the quality of the results. ;)
A number is randomly chosen between 1 and 100. The “guesser” is told at each guess whether their guess is correct, too high, or too low.
Four methods tested with the sequence used to successfully guess the number “1.”
**Random** Starts with a random number and draws a random guess from the range implied by the results of each round.
`Guessing: 65, 41, 32, 18, 14, 9, 3, 1`
**Equal Division** Starts with 50 and each time guesses the median value from the range implied by the results of each round.
`Guessing: 50, 25, 13, 7, 4, 2, 1`
**Fibonacci Division** Starts with 50 and each time guesses the golden ratio value from the range implied by the results of each round. In other words, divides by 1.618033989 instead of by 2. So either 32 or 81 will be it’s second round guess.
`Guessing: 50, 32, 21, 14, 10, 7, 5, 4, 3, 2, 1`
**Fibonacci Offset Division** Starts with 50 and each time guesses the golden ratio value based on whether they were too high or too low. So a guess of 50 that was “Too Low” would then choose 81. A guess of 50 that was “Too High” would choose 19.
`Guessing: 50, 19, 7, 3, 1`
I expected that Equal Division would be the winner but wanted to play around with some other options just to see. Here’s the distribution of how many tries it took to guess the correct number over 500 iterations using each of the different methods.
The condition for a win is guessing in fewer tries than the base-2 logarithm of the range (in this case the range is 100 and the base-2 logarithm of 100 is 6).