Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
RT @harisbinali: the price of ron97 fuel is set automatically. it will always rise... I thought we knew this. stop being ignorant fucks
Developing a flu
What about a Ruby client for socket.io?
What's the simplest way to implement a line-based protocol socket server in node.js?
Mine a[:b].inspect.split("=>").size-1 or a[:b][:c].inspect.split("=>").size-1. Similar to @arzumy we need no stinking recursion @sengming
We have a winner! “@arzumy: @kamal def foo(hash); hash.values.to_s.count('{'); end heh”
RT @sengming: @kamal def depth(hash, c = 0); hash.keys.empty? ? c : hash.keys.inject(0){|lc, key| lc += depth(hash[hash.keys.first], c + 1) }; end
RT @sengming: @kamal only goes in 1st key of hash tho. def depth(hash, count = 0); hash.keys.empty? ? count : depth(hash[hash.keys.first], count + 1); end
Clarification: the method should return a single number given any particular subhash. foo(a[:b]) it returns 3. foo(a[:b][:c]) it returns 2
Ruby code golf: given a deeply nested hash {:b=>{:c=>{:d=>{:e=>{}}}}}, return the count of descendents. e.g. :b => 3, :c => 2
RT @siong1987: @kamal a={:b=>{:c=>{:d=>{:e=>{}}}}};def gk(h,i=0,k={});h.each{|x, y|k[x]=i;gk(y,i-1,k)};k;end;puts gk(a, gk(a).length)
passenger_set_cgi_param HTTP_X_FORWARDED_PROTO https;
RDRC speaker highlights: @yukihiro_matz @imf @raasdnil @pragdave @mojombo @greggpollack @ryanbigg. Super lineup or super lineup??
Not really a quiz, more like code golf.
RT @Viki: Looking for developers with #RubyonRails #CSS & #Javascript experience! Based in Singapore. Details here: http://careers.stackoverflow.com/jobs...
Ruby quiz: given a deeply nested hash {:b=>{:c=>{:d=>{:e=>{}}}}}, return the count of descendents. e.g. :b => 3, :c => 2
The IM equivalent of CC-ing all your bosses to cover your ass is adding them into a Skype chat.
Happy 4th Birthday, Sarah! http://yfrog.com/h2wjodlj
Happy 4th Birthday, Sarah! http://t.co/nutZRV6
What's a decent place to meet and have lunch in KL Sentral? Anything in Sooka Sentral?
If I were Norwegian, I would have said "Hej #wckl pïpøl"
Before my battery runs out, hei #wckl people, I'm hiring 3 fulltime developers to work on Ruby on Rails projects. Let's meet!
On the way to #wckl
If I bought books, I bet I can be an actor too.
Taiping in the hizzouse @tekong
WHAT??!! “@LilJon: IM N KUALA LUMPUR BITCHHH¡!!”
I think we can offer a significantly better offering at @fluentspace :)
White Space now has hot desk for RM20/day at Solaris. You need an existing membership (RM99/mo is cheapest tier). You get 1 mineral water.
And I don't feel like building qt.
Other ways to read this feed:Feed readerFacebook