My Recent Pastes (20 and counting)

Pastes by Ana Nelson (20 and counting)

Pages:

Below are the 5 most recent pasties by Ana Nelson.

July 28, 2007
5:10AM EDT
by Ana Nelson

## date_time.rb

# Calculates the previous business day.
# When region is null, returns the weekday or previous Friday if a weekend day.
# When a region is passed, checks for holidays in this region.

July 27, 2007
2:47PM EDT
by Ana Nelson

def dbg(&block)
  sym = yield
  puts "#{sym.to_s}: #{eval(sym.to_s, block)}"
end

July 22, 2007
2:48PM EDT
by Ana Nelson

module Reportable
  def complete?
    data_errors.empty?
  end

July 22, 2007
1:58PM EDT
by Ana Nelson

rails $1
cd $1
ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec
ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails
ruby script/generate rspec

July 20, 2007
6:50PM EDT
by Ana Nelson

lt <- function(field, operator, value, data_frame) {
        switch(operator,
        "<" = is.na(data_frame[field]) | data_frame[field] < as.numeric(value),
        ">" = is.na(data_frame[field]) | data_frame[field] > as.numeric(value),
        TRUE # Return TRUE if there is no comparison operator - this means we just want the field name included but don't want to perform any operation on it.

Previous page