This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PrettyColumns | |
def run_stuff(sql) | |
result = ActiveRecord::Base.execute(sql) | |
order_columns(result) | |
end | |
def order_columns(result) | |
raise NotImplementedError | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int | |
main(int argc, char** argv) { | |
char protien[4] = "ACGT"; | |
int size = atoi(argv[1]); | |
int i = 0; | |
int pos = 0; | |
for(i; i < size; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Candidate | |
include MongoMapper::Document | |
key :alias, String, :required => true | |
key :notes, String | |
many :phones | |
end | |
class Phone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Candidate | |
include MongoMapper::Document | |
key :alias, String, :required => true | |
key :notes, String | |
many :phones | |
end | |
class Phone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module (histogram). | |
-compile (export_all). | |
-author ("Mr. M.S. Esquire Jonathan Raymond Hicks"). | |
% Where is this damn file on a mac? | |
% File = [ "a", "at", "red", "green", "dog"]. | |
% This will need to come from the command line | |
% Input = "reader". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Float | |
def divisible_by_2? | |
return self.value % 2 == 0 | |
end | |
def divisible_by_3? | |
return self.value % 3 == 0 | |
end | |
def divisible_by_6? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundler_test $ cat Gemfile | |
source :gemcutter | |
gem 'thor', '0.12.3' | |
gem 'activerecord', '2.3.4' | |
group :db do | |
gem 'activerecord-oracle_enhanced-adapter', '1.2.1' | |
end | |
bundler_test $ bundle install --without=db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env ruby | |
# encoding: utf-8 | |
module Foo | |
def hello | |
puts 'hi' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :gemcutter | |
gem 'rails', :git => 'git://github.com/rails/rails.git' | |
git 'git://github.com/rails/arel.git' | |
git 'git://github.com/rails/rack.git' | |
gem 'inherited_resources' | |
group :db do | |
gem 'pg' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
superclass mismatch for class PostgreSQLAdapter (TypeError) | |
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:189 | |
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:197:in `load_dependency' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activesupport/lib/active_support/dependencies.rb:209:in `require' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:74:in `establish_connection' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:60:in `establish_connection' | |
.bundle/ruby/1.8/bundler/gems/rails-master/activerecord/lib/acti |
OlderNewer