1 2 3 4
<?php function username($user_id = null) { !is_null($user_id) OR $user_id = current_user(); ...
PHP On get username from database
by WHF,
May 16, 2008 12:50
1 2 3 4
def make_activation_code self.activation_code = generate_code make_activation_code unless self.class.find_by_activation_code(activation_code).nil? ...
1 2 3 4
def save_feed @feed = FeedTools::Feed.open('http://losangeles.craigslist.org/apa/index.rss') @feed.items.each_with_index do |item,i| ...
1 2 3 4
public boolean equals(Object obj) { if (this == obj) ...
1 2 3 4
# Find all articles in the given date range based on the published_at field def self.find_archived(year, month=nil) if month.nil? ...
Ruby On Building a dynamic date range
by danielharan,
May 09, 2008 00:53
This version is a bit longe...
1 2 3 4
public boolean equals(Object obj) { return obj instanceof Bus && equals((Bus)obj); ...
JavaScript On Hex color between two colors
by Andre Steenveld,
May 06, 2008 10:28
You are welcome. And thanks...
1 2 3 4
class Poll attr_accessor :question def initialize(question, answers=[]) ...
Ruby On Rubyize this : 6th edition
by danielharan,
May 04, 2008 00:11
System is a vile word in a ...
1 2 3 4
<?php function username($user_id = null) { if(is_null($user_id)) $user_id = current_user(); ...
1 2 3 4
<?php function username($user_id = null) { $user_id = is_null($user_id) ? $user_id : current_user(); ...
JavaScript On Hex color between two colors
by Lucent,
April 30, 2008 23:10
Beautiful! I noticed the su...

Untested but this is a funn...