gdgdiler@toRuby
- 日時 :2017/08/26(土) 11:00 ~ 20:00
- 会場 : 那須野が原ハーモニーホール
- 主催 : とちぎRubyの会(toRuby)
| #include <M5Stack.h> | |
| #define NBIN 30 | |
| static int16_t s_ring[NBIN]; | |
| static int s_curr; | |
| static int16_t s_bg; | |
| static int s_delay = 20000; | |
| static unsigned long s_tm; | |
| void setup() { |
| def readfile( fn ) | |
| fp = open( fn ) | |
| str = "" | |
| fp.each_line.map { |ln| | |
| ln.split(",").map { |n| n.to_i } | |
| } | |
| end | |
| def solveNumPlace(problem, stack) | |
| memory = {candidate: [], row: 0, col: 0, problem: []} |
| require 'erb' | |
| class MyERB < ERB | |
| class CompilerWithBlock < ERB::Compiler | |
| def add_put_cmd(out, content) | |
| out.push("#{@put_cmd} #{content_dump(content)}") | |
| end | |
| BLOCK_EXPR = /\s+(do|\{)(\s*\|[^|]*\|)?\s*\Z/ | |
| def add_insert_cmd(out, content) |
| class Maze | |
| def initialize(w,h,input) | |
| @len_map = Hash.new | |
| @len_map[[w-1,h-1]] = 1 | |
| make_fence(input) | |
| end | |
| def make_fence(input) | |
| lr, tb = [], [] | |
| input.each_with_index do |e,i| |
| # -*- coding: utf-8 -*- | |
| framework "Cocoa" | |
| class AppDelegate | |
| def initialize | |
| # NSTimer の初期化 | |
| @timer = NSTimer.scheduledTimerWithTimeInterval(1.0, | |
| target:self, | |
| selector:"output:", | |
| userInfo:nil, |