LOLWOZ (via thedailywhat)
LOLWOZ (via thedailywhat)
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 :)
<?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;
}
?>
100 years ago, this man’s obesity was a circus act. (via Modeled Behavior)
Keith Yost in The story BCG offered me $16,000 not to tell (The Tech)
Kevin Bales on modern slavery at TED 2010.
There are now 27 million slaves in the world, more than in any point in history. The total cost for sustainable freedom for all of them is about $11 billion.