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
public static RubyArray local_variables19(ThreadContext context, IRubyObject recv) { | |
final Ruby runtime = context.runtime; | |
HashSet<String> encounteredLocalVariables = new HashSet<String>(); | |
RubyArray allLocalVariables = runtime.newArray(); | |
DynamicScope currentScope = context.getCurrentScope(); | |
while (currentScope != null) { | |
RubyArray localVariables = runtime.newArray(); | |
for (String name : currentScope.getAllNamesInScope()) { | |
if (IdUtil.isLocal(name) && !encounteredLocalVariables.contains(name)) { |
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
6 | |
4 7 | |
2 5 10 | |
insert(9) | |
new_root node (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
Node newRoot = new Node(root.getData()); | |
Node nextNode = root; | |
Node prevNode = newRoot; | |
while (nextNode != null) { | |
if (val > nextNode.getData()) { | |
assignNewNode(prevNode, nextNode.getLeft()); | |
nextNode = nextNode.getRight(); | |
} else { | |
assignNewNode(prevNode, nextNode.getRight()); |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (4.0.8) | |
actionpack (= 4.0.8) | |
mail (~> 2.5.4) | |
actionpack (4.0.8) | |
activesupport (= 4.0.8) | |
builder (~> 3.1.0) | |
erubis (~> 2.7.0) |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (4.0.8) | |
actionpack (= 4.0.8) | |
mail (~> 2.5.4) | |
actionpack (4.0.8) | |
activesupport (= 4.0.8) | |
builder (~> 3.1.0) | |
erubis (~> 2.7.0) |
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
[~/Code/gemfile/5] bundle --version | |
Bundler version 1.6.3 | |
[~/Code/gemfile/5] bundle | |
Fetching gem metadata from https://rubygems.org/........... | |
Fetching additional metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake 10.3.2 | |
Using tzinfo 0.3.39 | |
Using minitest 4.7.5 | |
Using thread_safe 0.3.4 |
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 'https://rubygems.org' | |
gem 'activeadmin' | |
gem 'addressable' | |
gem 'aws-sdk', :require => false | |
gem 'bson_ext' | |
gem 'canable' | |
gem 'carrierwave' | |
gem 'dalli' |
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
# Both the benchmarks after a warmup. | |
Java - 6 | |
Vector from Array | |
0.130000 0.000000 0.130000 ( 0.040000) | |
Vector#add | |
0.710000 0.020000 0.730000 ( 0.229000) | |
Array#<< | |
0.140000 0.000000 0.140000 ( 0.065000) |
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 Node | |
attr_accessor :edit, :array | |
def initialize(edit, list) | |
@edit = edit | |
@array = list | |
@count = 0 | |
@shift = 0 | |
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
Smits-MacBook-Pro:13 Who$ bundle | |
Fetching gem metadata from https://rubygems.org/........... | |
Resolving dependencies....................................................................... | |
Using i18n (0.6.9) | |
Using minitest (4.7.5) | |
Using multi_json (1.8.4) | |
Using atomic (1.1.14) | |
Using thread_safe (0.1.3) | |
Using tzinfo (0.3.38) | |
Using activesupport (4.0.2) |
NewerOlder