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, ...

267942571862781dd912de6482a35f46 Talk
javascript:(function(){
    var elm = document.getElementsByTagName("img");
    for (var i = 0; i < elm.length; i++) {
...

JavaScript Zoom all image files from s...

by griflet, February 27, 2008 23:49, 4 refactorings, tagged with bookmarklet, friendfeed

This one comes straight fro...

Aae34a7973a8d98e53764a1c89090c55 Talk
before_same :titlecase_fields
 
  def titlecase_fields
...

Ruby ActiveRecord Attributes rej...

by Aditya, February 28, 2008 15:41, 4 refactorings

I'd like to run titlecase m...

61dae6f655999810e6cf1ce3b106366e Talk
def squarebutton(name, options = {}, html_options = nil)
...

Ruby Adding default html option ...

by Michael Filbin, February 26, 2008 20:39, 3 refactorings, tagged with method, ActionView, UrlHelper, link_to

I have css directives for s...

14b8667b3bdf64068647b96c26001e0d Talk
# in lib/product_scraper/base.rb
class ProductScraper::Base
  def product_pages
...

Ruby OO Ruby help, por favor

by misfo.myopenid.com, February 01, 2008 16:19, 3 refactorings, tagged with rails, oop, oo, lib

This is really my first att...

Cee19a4eb998343e677f7f1cfd4de5bb Talk
function odump(object, depth, max){
  depth = depth || 0;
  max = max || 2;
...

JavaScript Recursively dump an object

by hubfactor, February 01, 2008 12:40, 3 refactorings, tagged with javascript, recursive, dump

Given an object, iterate th...

Ed9c50a6db8b5e078b5ef84306a8477c Talk
javascript:
popw='';
y=window;
...

JavaScript Mathtex bookmarklet

by griflet, February 15, 2008 11:11, 2 refactorings, tagged with bookmarklet, mathtex, latex

Join the lines and save it ...

Aae34a7973a8d98e53764a1c89090c55 Talk
#include <stdio.h>
#include <math.h>
int main ()
...

C Quanti bit per rappresentar...

by Tanino Rulez, February 20, 2008 00:16, 2 refactorings, tagged with int, integer, bit

Dato un intero,determinare ...

D8e099f752011ec60e809a733ef32a7e Talk
module Facon
  module Baconize

...

Ruby Including modules degradably

by chuyeow, February 10, 2008 14:45, 1 refactoring, tagged with ruby metaprogramming

Basically what I'm trying t...

00fd4ce27c06ba63e7ddca4c3d67e5ea Talk
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

Hi,

I have this contract...

1dd763e0b482e9ee14645ec2fa471634 Talk
#include <stdio.h>
int main ()
{
...

C Int or Double/Float ?

by Tanino Rulez, February 20, 2008 00:11, 1 refactoring, tagged with c, int, double, float

Dato un numero,restituisce ...

D8e099f752011ec60e809a733ef32a7e Talk
def init_scite_buffer
        # Check for allready opened files
        res = @director.send_command('savesession', '/tmp/SciTE.session', false)
...

Ruby Wait for file create

by Fu86, February 27, 2008 20:58, No refactoring, tagged with file, timeout, sleep, block

This method sends a command...

Ee0505bbd355292778077fb662c88f13 Talk
<? php
if $userinput = "http://www."
{
...

PHP Replace user input with link

by Mlopez, January 02, 2008 01:39, 28 refactorings, tagged with http, parsing, phrasing, help, user, php, url, with, text, replace

im not quite sure where to ...

132a00e84e74c003f68311b39b28e969 Talk
@wordsToHighlight=["important","monkey","dancing"]
def highlightText(input)
  for i in 0..@wordsToHighlight.length-1 do
...

Ruby Rubyize this : 5th edition

by FrankLamontagne, January 03, 2008 13:33, 16 refactorings

Here is the 5th edition of ...

364d0e86994a268906392f6b6146af38 Talk
<% myid = self.current_user.id %>


...

Ruby Rails has_many count

by nootopian, January 10, 2008 21:23, 11 refactorings, tagged with rails, has_many

Hi,

I have a users users...

62c433a96de9da99d09afedcded5de76 Talk
def filename
  self.uri.split('/').last
...

C# Get the Filename segment o...

by jwmittag, January 01, 2008 15:04, 11 refactorings, tagged with Comparison, Scott Porad, asp.net, DotNET, .net, C-Sharp, CSharp, C#, RoR, Ruby on Rails, rails, ruby

On his Blog "Progress vs. P...

89f45d140c5d9b14fd63720ea8b0cb47 Talk
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...

8bba46dba9043c254e6eef1aa664e6f0 Talk
module ApplicationHelper
  def time_month(month)
    return Time.now.months_ago(month)
...

Ruby last_number_of_months

by gregf, January 20, 2008 14:13, 6 refactorings, tagged with Ruby on Rails

Just wrote my first rails a...

70b86492b31e21b0748cc637a6b2f05a Talk
/**
     * 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...

55502f40dc8b7c769880b10874abc9d0 Talk
function showEMail() {
   var e = [ 'm','y','e','m','a','i','l','@','x','y','z','.','c','o','m' ];
   var s = '';
...

JavaScript Anti-spam Mailto

by Jerome Paradis, January 06, 2008 22:52, 6 refactorings, tagged with Anti-spam mailto

Here's a straightforward an...

70a3fa2b5cef1685f96ed038a63af2e4 Talk
def planned_percent_complete
    if self.planned_complete_in_dollars != nil
      (( self.planned_complete_in_dollars.to_f / self.task.budget.to_f )  * 100).round(2)
...

Ruby Same methods, different Act...

by Chris W., January 08, 2008 18:31, 6 refactorings, tagged with rails, ruby, activerecord, dry

I know there has to be a "r...

D41d8cd98f00b204e9800998ecf8427e Talk
require 'net/http'
require 'uri'
require 'strscan'
...

Ruby Display jpg image url from ...

by Gregory Barborini, January 30, 2008 04:47, 5 refactorings, tagged with image, regex

This code display jpg image...

C1ed5a3bfbb74ac76594077b1db30041 Talk
<?php

function fetch($url,$start,$end){
...

PHP Wikipedia API and text form...

by z3ro, January 09, 2008 18:37, 4 refactorings, tagged with convert, html, plain html, formatting, parser, regex, xml, php, wikimedia, api, wikipedia

I need to add Wikipedia's i...

E90ba01aea329491b312280d1eea606b Talk
<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...

4236ea6b84f4899b469e8edff4bf6d22 Talk
<?php

require_once("arc/ARC2.php"); // http://arc.semsol.org/
...

PHP Parse del.icio.us RSS feed

by hubfactor, January 28, 2008 16:08, 3 refactorings, tagged with php, rdf, del.icio.us

Uses ARC RDF parser from ht...

Ed9c50a6db8b5e078b5ef84306a8477c Talk