This file contains hidden or 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
Given I navigate to the validation form page # features/step_definitions/validation/input_steps.rb:3 | |
undefined method `body' for nil:NilClass (NoMethodError) | |
/Library/Ruby/Gems/1.8/gems/webrat-0.4.4/lib/webrat/rack.rb:17:in `response_body' | |
/Library/Ruby/Gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:164:in `exception_caught?' | |
/Library/Ruby/Gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:109:in `request_page' | |
/Library/Ruby/Gems/1.8/gems/webrat-0.4.4/lib/webrat/core/session.rb:205:in `visit' | |
(eval):2:in `visit' | |
./features/step_definitions/validation/input_steps.rb:4:in `__instance_exec0' | |
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.11/bin/../lib/cucumber/core_ext/instance_exec.rb:60:in `send' | |
/Library/Ruby/Gems/1.8/gems/cucumber-0.3.11/bin/../lib/cucumber/core_ext/instance_exec.rb:60:in `instance_exec' |
This file contains hidden or 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
Spec::Matchers.define :exist_on_fs do | |
match do |file| | |
File.exist? file | |
end | |
end |
This file contains hidden or 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
% rvm use 1.9 ~ | |
cat: /Users/franco/.rvm/.original_path: No such file or directory | |
ruby-use:1: no such file or directory: /Users/franco/.rvm/ruby-1.9.1-p243/bin/ruby | |
<w> ruby 1.9 is not installed, installing. | |
~/.rvm/src ~ | |
ruby-install-source:17: command not found: curl -O -L -s | |
tar (child): ruby-1.9.1-p243.tar.gz: Cannot open: No such file or directory | |
tar (child): Error is not recoverable: exiting now |
This file contains hidden or 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
# my class is Describe < Sinatra::Base | |
Describe.run! if __FILE__ == $0 | |
# error i get on that line | |
NoMethodError: undefined method `include?' for nil:NilClass | |
/Library/Ruby/Gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:505:in `nested_params' | |
/Library/Ruby/Gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:888:in `inject' | |
/Library/Ruby/Gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:504:in `each' | |
/Library/Ruby/Gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:504:in `inject' | |
/Library/Ruby/Gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:504:in `nested_params' |
This file contains hidden or 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
<head> | |
<title>Format Description Service</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript" src="public/js/jquery-1.3.2.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("uploadfile").change(function(event){ | |
fileElement = $("uploadfile").value.split("."); |
This file contains hidden or 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 Foo | |
private | |
def m | |
puts 'PRIVATE' | |
end | |
end | |
class Bar | |
include Foo | |
end |
This file contains hidden or 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> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
char server[20] = "wwwsearch.bing.com"; | |
int result_count; | |
char query[20]; | |
char command[100]; | |
char buffer[10000]; |
This file contains hidden or 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
# Comment out "require 'sinatra'" and it works fine | |
# otherwise output is: | |
# breakrjb.rb:3:in `initialize': dlopen(/System/Library/Frameworks/JavaVM.framework/Libraries/libjvm_compat.dylib, 9): image not found (RuntimeError) | |
# from breakrjb.rb:3:in `dlopen' | |
# from breakrjb.rb:3:in `load' | |
# from breakrjb.rb:3 | |
require 'sinatra' | |
require 'rjb' | |
Rjb::load |
This file contains hidden or 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
# parses output from the sql query | |
# reports the dedups | |
# finally reports a summary | |
packages = 0 | |
hit_packages = 0 | |
deletions = 0 | |
STDIN.each do |line| | |
dfid, data = line.chomp.split "\t", 2 |
This file contains hidden or 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 Main where | |
import System (getArgs) | |
import Text.RegexPR | |
-- matches lines against a pattern | |
grep :: String -> [String] -> [String] | |
grep p = filter $ match | |
where match s = case matchRegexPR p s of | |
Just _ -> True |