04 May '12, 2pm

Ruby quick tip: want to get a random element from an Array? Use Array#sample

Choose a random element or n random elements from the array. The elements are chosen by using random and unique indices into the array in order to ensure that an element doesn’t repeat itself unless the array already contained duplicate elements. If the array is empty the first form returns nil and the second form returns an empty array. If rng is given, it will be used as the random number generator.

Full article: http://apidock.com/ruby/Array/sample

Tweets

Quick Draw | - Golf Tips Magazine: Add power, stop slicing, make more putts - whatever golf

Quick Draw | - Golf Tips Magazine: Add power, s...

golftipsmag.com 05 May '12, 12am

Get It Moving Right-to-Left in a Hurry! By Tom Stickney, PGA Labels: Instruction , Driving , Techniques , Full Swing This ...

BOS Series: Your New Solar Array (Actual Perfor...

renewableenergyworld.com 27 Apr '12, 1pm

As all experienced car owners know, performance varies. You have to maintain the health of your car to get even close to t...

BOS Series: Your New Solar Array (Actual Perfor...

renewableenergyworld.com 27 Apr '12, 2pm

As all experienced car owners know, performance varies. You have to maintain the health of your car to get even close to t...

New post: A few quick thoughts on barista compe...

jimseven.com 02 May '12, 1pm

A few quick thoughts on barista competition May 2nd, 2012 I’ve been around a few barista competitions recently, and I’ve w...