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 int deliverBusinessValue() { | |
| int value = 10; | |
| try { | |
| value = 20; | |
| throw new NotEnoughValueDeliveredException(); | |
| } catch (Exception e) { | |
| value = 30; | |
| return value; | |
| } finally { |
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
| And Live Sale is updated to start now | |
| And auctioneer enters into the Live Sale | |
| And seller enters into the Live Sale | |
| And Following buyers have registered for the Live Sale | |
| | role | | |
| | buyer_1 | | |
| | buyer_2 | | |
| When auctioneer starts the Live Sale |
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 | |
| curl -L https://get.rvm.io | bash -s stable --autolibs=enabled | |
| source /home/ubuntu/.rvm/scripts/rvm | |
| rvm install 1.9.3-p194 | |
| #app | |
| cd ~/ | |
| git clone https://github.com/distributedlife/makebook.git | |
| cd makebook | |
| bundle install |
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
| Dir["*.tex"].each do|filename| | |
| File.open(filename).each do |line| | |
| puts "#{filename} - #{r.match(line)} - #{line}" unless r.match(line).nil? | |
| 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
| define(['cricket/server_player', 'lib/event_emitter'], function(ServerPlayer, EventEmitter) { | |
| "use strict"; | |
| return function(fielding_ai, bowling_ai, batting_ai) { | |
| var _this = new ServerPlayer(); | |
| _this.init = function() { | |
| _this.typename = "ai"; | |
| EventEmitter.call(_this); |
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
| return (batter, bowler, scorer, field) -> | |
| _this = this | |
| _this.init = function() { | |
| _this.steps["set_momentum"] = new WaitForAll([batter, bowler], '/public/over/set_momentum/complete', _this.draw_hand); | |
| _this.steps["draw_hand"] = new WaitForAll([batter, bowler], '/public/over/draw_hand/complete', _this.play_each_ball); | |
| } | |
| _this.set_momentum = () -> | |
| _this.steps["set_momentum"].start("set_momentum", field) |
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 MyClass { | |
| public static int test_my_return() { | |
| int value = 10; | |
| System.out.println("value = " + value); | |
| try { | |
| value = 20; | |
| System.out.println("value = " + value); | |
| throw new Exception(); | |
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
| TextureManager::Atlas::Node* TextureManager::Atlas::Node::insert( const TextureWithIDT& textureToInsert ) { | |
| if (children.first && children.second) { | |
| // branch node, try children | |
| Node* newNode = children.first->insert( textureToInsert ); | |
| if (newNode) { | |
| return newNode; | |
| } | |
| return children.second->insert( textureToInsert ); |
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
| require 'rubygems' | |
| require 'json' | |
| require 'date' | |
| ignore = ["Shared Database Server Offline", "Elevated Error Rates Around Bamboo", "Emergency Maintenance Window on Bamboo and Aspen HTTP stacks", "Emergency Maintenance Window for Aspen/Bamboo Deploys", "Intermittent Git Errors", "Emergency Maintenance on a Shared Database Server", "Emergency Maintenance on Logging Infrastructure ", "Errors Launching Terminal Attached Processes"] | |
| records = "" | |
| File.open("issues.json") do |file| | |
| file.readlines.each do |line| | |
| records += line |
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
| def self.duplicates_sets | |
| duplicate_sql = <<-SQL | |
| SELECT form, language_id, idiom_id, pronunciation, count(*) | |
| FROM translations | |
| GROUP BY form, language_id, idiom_id, pronunciation | |
| HAVING count(*) > 1 | |
| SQL | |
| ActiveRecord::Base.connection.execute(duplicate_sql) | |
| end |