1
2
3
q = "query1=apa&query2=apa2"
Hash[q.split("&").collect{|a| a.split("=")}.flatten]
=> {"query1"=>"apa", "query2"=>"apa2"}

Ruby Parse a querystring

by Simon, October 05, 2009 19:47, 2 refactorings, tagged with ruby, short, fun

I'm looking if someone can ...

865351a8b8bb963c7ee935b3f342854e Talk
1
2
3
4
#include <iostream>
#include <stdio.h>
//#include <cstdlib>
...

C++ Calender

by vhar.myopenid.com, August 14, 2009 05:09, 4 refactorings, tagged with fun

prints months calenders fro...

Avatar Talk
1
2
3
4
#include <stdio.h>
#include <ctype.h>
#include <string.h>
...

C FLAMES!!!!!!!!!!!!!!!!!

by vhar.myopenid.com, August 11, 2009 14:00, 7 refactorings, tagged with fun

a little game which give yo...

Avatar Talk
1
2
3
4
#include <stdio.h>

int f(char*s) { 
...

C C Puzzle for Fun

by steve.hanov.myopenid.com, March 13, 2009 02:58, 6 refactorings, tagged with c, puzzle, fun

Here's a puzzle I came up w...

Avatar Talk
1
2
3
4
class VotingSystem  
  #Hello, I am Rodger the old and unhappy programmer. the variable nbrOfVotes is an array of 2 dimensions. The first dimension contains the number of votes for the answer "YES, IT SUCKS"... and the other dimension contain the number of votes for the answer "NO, IT DOESN'T SUCK". In the near future there will be other possible answers... but I don't care! I retire in 2 days!
  @@nbrOfVotes = Array.new
...

Ruby Rubyize this : 6th edition

by FrankLamontagne, April 17, 2008 00:20, 8 refactorings, tagged with rubyize-this, ruby, fun

Ouch... this guy badly need...

364d0e86994a268906392f6b6146af38 Talk