make_resourceful do
actions :all
before(:create) { current_object.user = current_user }
...
Ruby make_resourceful plugin wit...
by rajesh,
February 25, 2008 20:06,
1 refactoring, tagged with make_resoureful, google maps, ym4r_gm
require 'rubygems' require 'data_mapper' require 'benchmark' ...
Ruby DataMapper threaded benchmark
by Kevin Williams,
February 20, 2008 04:38,
123 refactorings, tagged with orm, benchmark, datamapper
third of three - slowest of...
require 'rubygems' require 'sequel' require 'benchmark' ...
Ruby Sequel threaded benchmark
second of three, not as fas...
require 'rubygems' require 'active_record' require 'benchmark' ...
Ruby ActiveRecord threaded bench...
by Kevin Williams,
February 20, 2008 04:33,
6 refactorings, tagged with orm, activerecord, benchmark
first of three benchmarks, ...
#include <stdio.h> #include <math.h> int main () ...
C Quanti bit per rappresentar...
Dato un intero,determinare ...
SCRIPT="gen_${1}.sql"
echo "--gen_${1}.sql" > $SCRIPT
typeset -i counter
...
Bash Slow bash for loop.
Here's a quick and dirty ba...
<?php
$params = array('SID','t','p','hilite');
...
PHP Removing Parameters from an...
by Martindale,
February 07, 2008 17:32,
13 refactorings
Removing a list of paramete...
# in lib/product_scraper/base.rb class ProductScraper::Base def product_pages ...
Ruby OO Ruby help, por favor
This is really my first att...
function odump(object, depth, max){
depth = depth || 0;
max = max || 2;
...
JavaScript Recursively dump an object
Given an object, iterate th...
<table class="charge">
<tr>
<td colspan="100%" class="mainHeader"><%=@label.label%></td>
...
Ruby Iterating through a nested ...
by mwilliams,
January 31, 2008 18:21,
3 refactorings, tagged with rails, ruby, Ruby on Rails, view, table, hash, nested hash, iterator, iterate
Good afternoon. I have a n...
<%= stylesheet_link_tag 'style' %> <%= stylesheet_link_tag site_short_name + "/stylesheet.css" %> ...
Ruby DRY up my forms!
by openid.aol.com/Zanoryt,
January 30, 2008 05:36,
2 refactorings, tagged with Ruby on Rails, formbuilder, forms, dry form
Holy smokes! Maintaining th...
require 'net/http' require 'uri' require 'strscan' ...
Ruby Display jpg image url from ...
This code display jpg image...
<?php
require_once("arc/ARC2.php"); // http://arc.semsol.org/
...
PHP Parse del.icio.us RSS feed
Uses ARC RDF parser from ht...
class CPM
def get_output_binding
CustomBinding.new({
...
Ruby Custom binding from an object
Hi! I have a class with lot...
module AttrLazy def self.included(base_class) ...
Ruby ActiveRecord lazy attribute...
by cassidy.myopenid.com,
January 26, 2008 19:25,
2 refactorings, tagged with rails activerecord plugin lazy
I threw this together as an...
public List<double> GenerateLogNormalDistribution(int numberOfTimes, double mean, double standardDeviation)
{
Random randomGenerator = new Random();
...
C# Lognormal Distribution
Is there a better way to do...
module ApplicationHelper
def time_month(month)
return Time.now.months_ago(month)
...
Ruby last_number_of_months
Just wrote my first rails a...
/**
* warning performs a cartesian product
* @param list of NameAddress objects
...
Java clean up nested loops?
by getopenid.com/garretokelly,
January 16, 2008 21:10,
6 refactorings
Given a list of NameAddress...
check out: http://www.thethirteenthstory.com/WFCINC/site/ the menus grow in IE, fine in all other browsers ...
JavaScript growing menus ?
i know this isn't a help fo...
function db_cache_2($query)
{
// Query cache table
...
PHP DB Cache
by ellisgl.myopenid.com,
January 14, 2008 22:48,
8 refactorings, tagged with php, cache, mysql, update
It's a DB caching scheme th...
function makeClickableLinks($text) {
# http
...
PHP Plain Text to clickable
This works for http:// http...
Hi,
I have this contract...