Yoshimoto Cube
Thursday, January 1st, 2009
(soruce: MetaFilter, thanks John)
Here is also a clear, do it yourself instruction video.
(soruce: MetaFilter, thanks John)
Here is also a clear, do it yourself instruction video.
Quantitative finance and risk management are not just about the numbers. Numbers play a part, but so does the human side of the business. When analyzing risk it is important to be able to think creatively about scenarios. Unfortunately the training that most quants get seems to actively discourage creativity.
…
You are in the audience at a small, intimate theatre, watching a magic show. The magician hands a pack of cards to a random member of the audience, asks him to check that it’s an ordinary pack, and would he please give it a shuffle. The magician turns to another member of the audience and asks her to name a card at random. “Ace of Hearts,” she says. The magician covers his eyes, reaches out to the pack of cards, and after some fumbling around he pulls out a card. The question to you is what is the probability of the card being the Ace of Hearts?
Note that from the brief description, it appears that this is actually not genetic-programming (GP) but the application of a genetic algorithm (GA). Simply put, GP is where one or more GAs are used to generate the program. Here a GA is used to generate a set of colored polygons (with alpha channel). The comments of the blog entry hold other gems like the Mutating Pictures Gallery.
(source: Roger Alsing Blog)
UPDATE: There is an online version now. (Thanks John.)
function boolean hasLoop(Node startN)
{
Node slowN= Node fastN1= Node fastN2= startN;
while(slowN && fastN1= fastN2.next() && fastN2= fastN1.next())
{
if (slowN == fastN1 || slowN == fastN2) return true;
slowN= slowN.next();
}
return false;
}
To fully appreciate, read this article.
Thanks John.
Since we clearly are going for speed over clarity, I would go all the way and shift out the NULL check only needed once from the while loop.
function boolean hasLoop(Node startN)
{
Node slowN= Node fastN1= Node fastN2= startN;
if(slowN) while(fastN1= fastN2.next() && fastN2= fastN1.next())
{
if (slowN == fastN1 || slowN == fastN2) return true;
slowN= slowN.next();
}
return false;
}
(via: Hack-a-Day)
Het begon voor Andrew S. Tanenbaum als een aardigheidje voor vrienden. Onder het pseudoniem Votemaster lanceerde de hoogleraar informatica in mei 2004 een website met de laatste peilingen in de race om het Witte Huis. Op een landkaart kleurde hij in welke staat naar Bush en welke naar Kerry leek te gaan, en wat dit betekende voor de verhoudingen in het college van kiesmannen, dat uiteindelijk de president kiest.
(source: NRC)