245 karma · joined September 23, 2009
n=1234567;(1..n).reduce{|t,n|s=i=0;loop{i+=1;s+=rand;break if s>=1};t+i}.to_f/n"ah, actually 1.1.x isn't vulnerable. The issue first arrived in 2.0" - https://twitter.com/tenderlove/status/288777229276704768
On another note, I believe that this is why native still is around.
# Ethiopian Multiplication
# usage: ruby em.rb 673 7
m, n = ARGV.map(&:to_i)
product = 0
while m >= 1
puts "%4d : %4d %s" % [m, n, m.even? ? "Ignore" : ""]
product += n unless m.even?
m = m / 2
n = n * 2
end
puts "Product: #{product}"
https://gist.github.com/3660240I didn't like "It is critical to remember that play is not exercise." and to improve it I would like to add something like "But it's totally fine if your exercise feels like play. If your exercise is fun it's so much easier to do".
http://www.youtube.com/watch?v=_5UwJM2kGfo - Bits of Evidence: Code inspections
Unfortunately it's divided in chapters without any indexing so it can get a bit confusing since you most probably aren't going to be able to watch them in the order he presented them. Still worth it!
Why would you believe that Goldman Sachs stores more data than can be reached by HTTP?! Only YouTube amounts to petabytes of data. http://beerpla.net/2008/08/14/how-to-find-out-the-number-of-...
Maybe Bell studied 13th-century Cosmati mosaics.
Firefox 27,725 45.15%
Chrome 16,856 27.45%
Internet Explorer 6,191 10.08%
Safari 6,085 9.91%
Opera 2,165 3.53%
Mozilla Compatible Agent 1,395 2.27%
Mozilla 418 0.68%
Konqueror 185 0.30%
Opera Mini 126 0.21%
SeaMonkey 107 0.17%
OS:
Windows 35,928 58.51%
Linux 10,855 17.68%
Macintosh 10,709 17.44%
iPhone 1,726 2.81%
Android 926 1.51%
iPad 625 1.02%
not set 181 0.29%
iPod 159 0.26%
FreeBSD 88 0.14%
SunOS 69 0.11%
17% Mac users (even more if you count iPhone, iPad, & iPod) but still only 10% Safari.
It's a nice little trick.
You could also use my absolutely horrible looking http://average.heroku.com/