danieldl.

Apr 25

LOLWOZ (via thedailywhat)

LOLWOZ (via thedailywhat)

Apr 20

Tumblr was kind enough to let me know that danieldl.info just turned 3! In that time it has welcomed 460,322 unique visitors requesting 802,445 pageviews :)

Tumblr was kind enough to let me know that danieldl.info just turned 3! In that time it has welcomed 460,322 unique visitors requesting 802,445 pageviews :)

Apr 18

[video]

Apr 17

Geek And Poke: Meta

Geek And Poke: Meta

TI-84 statistics functions (nCr, binomcdf, binompdf, factorials) implemented in PHP

<?php
/********************************************************
Copyright (c) 2010, Daniel de Leeuw <danieldl@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of danieldl.info nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL DANIEL DE LEEUW BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

********************************************************/


function nCr($n, $k) {
  //Valid for 0 <= k <= n
  return factorial($n)/(factorial($k)*factorial($n - $k));
}
function factorial($n) {
  $f = 1;
  for($i = 1; $i <= $n; $i++) {
    $f = $f*$i;
  }
  return $f;
}
function binompdf($n, $p, $k) {
  return nCr($n, $k)*pow($p, $k)*pow(1-$p, $n-$k);
}
function binomcdf($n, $p, $k) {
  $b = 0;
  for($i = 0; $i <= $k; $i++) {
    $b = $b+binompdf($n, $p, $i);
  }
  return $b;
}
?>

Apr 16

100 years ago, this man&#8217;s obesity was a circus act. (via Modeled Behavior)

100 years ago, this man’s obesity was a circus act. (via Modeled Behavior)

Apr 14

Apr 13

“What I learned is that burning out isn’t just about work load, it’s about work load being greater than the motivation to do work.” — Keith Yost in The story BCG offered me $16,000 not to tell (The Tech)

Apr 05

[video]

The 19 things the iPad will kill.

Apr 03

Goodbye to the laptop and compact camera!

Apr 01

[video]

A real person, a lot like you

Mar 28

The Rage Is Not About Health Care