What do yuo think of it?
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
| public <T> MyList ofType(Class<T> klass) { | |
| MyList list = new MyList(); | |
| for(MyElement elem : this) { | |
| if(elem instanceof klass) { | |
| list.add(elem); | |
| } | |
| } | |
| return(list); |
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
| sudo apt-get install build-essential zlib1g-dev libreadline-dev libssl-dev libxml2-dev git | |
| curl -L https://get.rvm.io | bash -s stable | |
| source ~/.rvm/scripts/rvm |
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
| begin | |
| raise "Hello, World!" | |
| rescue => e | |
| puts "#{e.class.name}: #{e}" | |
| end | |
| begin | |
| raise ArgumentError, "Hello, World!" | |
| rescue => e | |
| puts "#{e.class.name}: #{e}" |
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
| arr = [] | |
| my_variable = false | |
| my_other_variable = true | |
| arr << my_variable ? "This was true." : "This was false." | |
| arr << my_other_variable ? "This was true." : "This was false." | |
| p arr |
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_ruby/gems/rspec-gc-control-1.0.1/lib/rspec-gc-control/configuration.rb:30: [BUG] Segmentation fault | |
| ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.0.0] | |
| -- Control frame information ----------------------------------------------- | |
| c:0029 p:---- s:0115 b:0115 l:000114 d:000114 CFUNC :start | |
| c:0028 p:0138 s:0112 b:0112 l:000111 d:000111 METHOD /my_ruby/gems/rspec-gc-control-1.0.1/lib/rspec-gc-control/configuration.rb:30 | |
| c:0027 p:0045 s:0107 b:0104 l:000103 d:000103 METHOD /my_ruby/gems/rspec-gc-control-1.0.1/lib/rspec-gc-control/example.rb:21 | |
| c:0026 p:0036 s:0101 b:0100 l:0011f0 d:001360 BLOCK /my_ruby/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:119 | |
| c:0025 p:0024 s:0097 b:0097 l:0013d8 d:0013d8 METHOD /my_ruby/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253 | |
| c:0024 p:0059 s:0092 b:0092 l:0011f0 d:0011f0 METHOD /my_ruby/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110 |
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
| public class Fib { | |
| public static int fib(int n) { | |
| if(n <= 2) { | |
| return 1; | |
| } else { | |
| return fib(n-1) + fib(n-2); | |
| } | |
| } | |
| public static void main(String[] args) { |
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
| package main | |
| import ( | |
| "runtime" | |
| "time" | |
| "math/rand" | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| ) |
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
| brad@/www/reel_test [master] $ heroku scale web=40 | |
| Scaling web processes... done, now running 40 | |
| brad@/www/reel_test [master] $ ab -c 1 -n 100 http://reel-test.herokuapp.com/ | |
| This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
| Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
| Licensed to The Apache Software Foundation, http://www.apache.org/ | |
| Benchmarking reel-test.herokuapp.com (be patient).....done | |
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
| RPC to '[email protected]' failed: {'EXIT', | |
| {timeout, | |
| {gen_server,call, | |
| [riak_core_gossip, | |
| legacy_gossip]}}} |