オフラインリアルタイムどう書く という、 @Nabetani さん主催のイベントを模したものを ESM の社内向けに行ったものです。
出題者: @kunitoo スペシャルサンクス: @mattsan, @mtsmfm
| package game; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class KokonTouzai { | |
| public static void main(String[] args) throws IOException{ | |
| KokonTouzai kokonTouzai = KokonTouzai.newInstance(); | 
| #/bin/sh | |
| if [ $# -ne 1 ]; then | |
| echo "sh create_branch.sh 'branch_name'" 1>&2 | |
| exit 1 | |
| fi | |
| git branch $1 | |
| git checkout $1 | |
| git push origin $1 | 
| $('a.left').html( | |
| $('<img>') | |
| .attr('src', 'http://docs.komagata.org/theme/p0t/images/movable_face.gif') | |
| .attr('class', 'mega-icon-invertocat') | |
| ); | 
| require 'rubygems' | |
| require 'neography' | |
| @neo = Neography::Rest.new | |
| def clean_nodes | |
| @neo.execute_query('match n detach delete n') | |
| end | |
| def setup_nodes | 
| /home/kunitoo/.rbenv/versions/2.3.0-preview2/lib/ruby/gems/2.3.0/gems/rabbit-2.1.8/lib/rabbit/parser/ext/entity.rb:355: warning: key "Dagger" is duplicated and overwritten on line 2409 | |
| /home/kunitoo/.rbenv/versions/2.3.0-preview2/lib/ruby/gems/2.3.0/gems/rabbit-2.1.8/lib/rabbit/parser/ext/entity.rb:357: warning: key "dagger" is duplicated and overwritten on line 2411 | |
| /home/kunitoo/.rbenv/versions/2.3.0-preview2/lib/ruby/gems/2.3.0/gems/rabbit-2.1.8/lib/rabbit/theme/default-item-mark-setup/default-item-mark-setup.rb:56: [BUG] Segmentation fault at 0x00000000000049 | |
| ruby 2.3.0preview2 (2015-12-11 trunk 53028) [x86_64-linux] | |
| -- Control frame information ----------------------------------------------- | |
| c:0065 p:0019 s:0414 e:000412 BLOCK /home/kunitoo/.rbenv/versions/2.3.0-preview2/lib/ruby/gems/2.3.0/gems/rabbit-2.1.8/lib/rabbit/theme/default-item-mark-setup/def | |
| c:0064 p:0224 s:0404 e:000403 BLOCK /home/kunitoo/.rbenv/versions/2.3.0-preview2/lib/ruby/gems/2.3.0/gems/rabbit-2.1.8/lib/rabbit/theme/applier.rb:94 | |
| c | 
| require 'rubygems' | |
| class Node | |
| attr :name | |
| attr_accessor :color | |
| def initialize(name, color) | |
| @name = name | |
| @color = color | |
| end | 
| source 'https://rubygems.org' | |
| gem 'neo4j' | 
| class Rectangle | |
| attr_accessor :x, :y, :size | |
| def initialize(x, y, size) | |
| @x = x | |
| @y = y | |
| @size = size | |
| end | |
| def include?(x, y) | |
| @x <= x && @x + @size > x && @y <= y && @y + @size > y | 
オフラインリアルタイムどう書く という、 @Nabetani さん主催のイベントを模したものを ESM の社内向けに行ったものです。
出題者: @kunitoo スペシャルサンクス: @mattsan, @mtsmfm
| module Q1 | |
| def self.count | |
| coins = [10, 50, 100, 500] | |
| result = [] | |
| (2..15).each do |n| | |
| coins.repeated_combination(n).each do |cs| | |
| result << cs if cs.inject(:+) == 1000 | |
| end | |
| end |