grosser.it
Check if a numer is a power of 2 in ruby | Michael Grosser, the Blog
https://grosser.it/2010/03/06/check-if-a-numer-is-a-power-of-2-in-ruby
Michael Grosser, the Blog. Check if a numer is a power of 2 in ruby. One imo not-so-obvious solution is:. 0 - false, 1- true, 2- true, 3- false . n.to s(2).scan(/1/).size = 1. And why it works is an exercise for the reader😉. A crazy benchmark comparing different versions of power of 2 algorithms by reto. The fastest, still readable versions is:. N and (n 1) = 0 . followed by . Math.log(n) / Math.log(2) % 1 = 0. Simple nested layout for rails. ActiveRecord without default scope →. Does not count them🙂.
nerdart.org
::: nerdart :::
http://www.nerdart.org/nerdart_1.html
Nerdart @ ZeitZone March 2010 : :. Berlin, March 5th 16th, 2010]. Nerdart #01 a group exhibition with sound and visuals. 12032010 8:08 pm with aftermars and breitband. 14032010 3:03 pm with k.l.a.u.s. and coffe and cake. ZeitZone on a map. Aaston Brooks : : music : : visuals. Christiane Bischoff : : graphic art : : fraubischoff. Eno Thierbach : : photography : : radiospiel. Olaf Giesbrecht : : music : : breitband. Sebastien Brault : : music : : aftermars.
SOCIAL ENGAGEMENT