Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

instance

People Who Took This Facebook Class At Stanford in 2007 are Making Millions [Facebook]
Saturday, 07 May 2011 19:00
Anyone who's seen "The Social Network" knows that, by the middle of the last decade, the leaders in tech were skewing younger and making money faster. In one notable instance at Stanford, the secret of success was this: cut corners! More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/h_UGQDCAQLs/if-you-took-the-facebook-class-at-stanford-in-2007-you-might-be-making-millions

 
What Would You Do During a Flight Emergency? Tweet Pictures! [Twitter]
Saturday, 02 April 2011 13:00
There are a number of things you could do in the midst of an aerial emergency. Calling loved ones, for instance. I think tweeting pictures might be up for consideration. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/Rv1nMG2ZUcU/what-would-you-do-during-a-flight-emergency-tweet-pictures

 
What Would You Do During a Flight Emergency? Tweet Pictures! [Video]
Saturday, 02 April 2011 13:00
There are a number of things you could do in the midst of an aerial emergency. Calling loved ones, for instance. I think tweeting pictures might be up for consideration. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/Rv1nMG2ZUcU/what-would-you-do-during-a-flight-emergency-tweet-pictures

 
How the iPad Changed This Disabled 7 Year Old Boy's Life [Ipad]
Monday, 01 November 2010 10:00
The iPad, and other tablets like it, may actually be a magic and revolutionary device after all. Because at least in this instance, it's given a disabled 7-year old boy the ability to communicate with the world. More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/cYW5oCAzeto/how-the-ipad-changed-this-disabled-7-year-old-boys-life

 
Using Object#instance_variable_get
Saturday, 19 June 2010 17:30
Source: instance_variable_get (Object) [apidock.com]

Returns the value of the given instance variable, or nil if the instance variable is not set. The @ part of the variable name should be included for regular instance variables. Throws a NameError exception if the supplied symbol is not valid as an instance variable name.


class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
fred.instance_variable_get(:@a) #=> "cat"
fred.instance_variable_get("@b") #=> 99



*update: 19-Jun-2010 @ 7:40pm*
Here's another example:

class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end

def list_instance_variables
vars = self.instance_variables
vars.map{|x| "%s: %s" % [x,self.instance_variable_get(x)]}
end
end

fred = Fred.new('cat', 99)
fred.list_instance_variables
#=> ["@a: cat", "@b: 99"]

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/Ie802pssATw/11693

 


Taxonomy by Zaragoza Online