Panic Blog » The Panic Status Board
HTML/CSS: Neven says, “This baby is all WebKit candy. The only images here are the icons. The rounded corners, the gradients, the animation – all CSS. Learn -webkit-transform and love it!
Panic Blog » The Panic Status Board
HTML/CSS: Neven says, “This baby is all WebKit candy. The only images here are the icons. The rounded corners, the gradients, the animation – all CSS. Learn -webkit-transform and love it!
Disc Golf, Week 2
Shot a +22 yesterday. Heh, getting better!
Mr. Lundy, I’m hoping to spread the disc love down your way in California. Ahem, ahem.
High-End Hemp Speakers Are All the Buzz
And the dropped “d”?
“It just sounded better,” he says with a shrug. “It’s a ’70s thing.”
Well I’m sold. That’s all I needed to hear.
Anonymous asked: Yes, cuter than a bunny dressed up as Sherlock Holmes smoking a bubble pipe.
You are correct.
Then it’s settled. Jared: 1, Bunnies: 0
I win :)
Anonymous asked: You are the cutest thing in the world.
Cuter than a bunny dressed up as Sherlock Holmes smoking a bubble pipe? Close call I’d say.
Oh anonymous… Thanks ;)
It’s been a hell of a ride, my expensive little friend. I’d be lying if I said I’m sad to see you go. Now to take care of your much larger, much more expensive brother. FUUUUU.
It was my goal to wipe out at least one major school loan before I hit 30. Done and done. Clearing debt is the BEST.
POWERFUL
The backstory for this one might be too deep to get into but I’ll try to fill it in and get it right.
Back at RIT, dalas and Kevin recorded what’s probably the funniest thing Kevin has ever done for Jakob Lodwick’s (and others) show The Ginch. All improvised, and the raw footage is around 1 hour. The tape has been in Mr. Lodwick’s possession for years and dalas just recently got his hands on the original tape. It’s just as funny as it was 8 years ago. Hooooly shit, Kev.
So instead of just letting Kevin have his shining moment of glory, Cory decides to step in and take ownership of the tape, only to do what you see in this video.
Spite is a very powerful motivator within our friendships.
We’re still friends, right!?
PS - That’s me behind the camera, giggling.
While updating a site our shop created for Google, I needed to find a way to randomize a finite set of items. Little did I know that while performing a typical random sort on an array may certainly create a randomized set of results, the results are biased.
The typical, lazy random sort works like so:
function RandomSort (a,b) {
return (0.5 - Math.random());
}
But if your goal is to reach a truly normalized and equal distribution of results, this method is flawed as it will always favor at least one member of your finite set. For a better explanation, read this.
The fix is to implement an algorithm that works essentially the same way as picking cards from a hat: you randomly choose one member from the set, remove it from the set, decrease the range of your set by 1 and repeat until you reach the last member of your set. This is what the Fisher-Yates shuffle is all about.
Here’s a javascript implementation of the more modern Durstenfeld algorithm:
function arrayShuffle(aArray) {
var mTemp,j,i=aArray.length;
while (i) {
j = Math.floor(Math.random() * i);
mTemp = aArray[--i];
aArray[i] = aArray[j];
aArray[j] = mTemp;
}
}
I tested this over 1,000 10,000 and 100,000 iterations and the results were essentially the same. The variation over all the results was the was less than 10%. BAM!
So there you have it. If you ever need a truly random permutation of a finite set where the results are equally distributed, this is the way to go.