- Count_lib_v2 / prev peek
- chino_to_enum / prev
この三つは非常に低速 nextの数百倍~
この実装はpeekだけの速度を犠牲にした ( rewind の使用
c = -> a , b { a * b }.curry | |
c = c[2] | |
p c[4] | |
p c[8] |
def re ans1 , ans2 , af, bf | |
[*0..9].repeated_permutation(2).to_a.each do |x,y| | |
if af[x,y] == ans1 | |
if bf[x,y] == ans2 | |
print "x=",x , "_y=" , y | |
print "_af_" , af[x,y] , "_" | |
print "_bf_" , bf[x,y] , "\n" | |
return x,y | |
end |
10.times do | |
p $mode = 1.-($mode || 0) | |
end |
class Class | |
def check n | |
return n if n.instance_of? self | |
raise "object-type-error #{self}.#{__method__} #{n} == #{n.class}" | |
end | |
end | |
def func n | |
n * 2 | |
end |
#coding:utf-8 | |
require "dxruby" | |
Dir.chdir File.dirname(File.expand_path(__FILE__)) | |
Window.width = 400 | |
Window.height = 400 | |
TASK = Object.new.extend Module.new{attr_accessor :scene , :scene_sys , :user,:user_shot,:enemy,:enemy_shot , :effect} | |
TASK.scene = [] | |
TASK.scene_sys = [] | |
TASK.effect = [] |
def repl s | |
(s=~/\(.*?(\(.*)\)/?s.sub($1,repl($1).to_s):s).scan(/\((.*?)\s(.*)\)/).last.last.split.map(&:to_i).inject *(eval"[$1=~/[a-z]/,:#{$1}].compact") | |
end | |
repl"(print (+ 8 9))" | |
puts | |
p repl"(* 8 9 5 5 5 5)" | |
repl"(p (* 59 5 (* 4 (/ 10 6))))" | |
順番はランダムです | |
自動で生成したので中には存在しないボイスのURLが存在します | |
アジ・ダハーカ | |
種族:魔種 | |
画像URL:http://cache.lova.jp/servantdatabase/ver20150424/art/mcY_jSRUinw-_art.jpg | |
ボイスURL:http://cache.lova.jp/servantdatabase/ver20150424/voice/mcY_jSRUinw-_voice.mp3 | |
データインポートURL:http://lova.jp/servantdatabase/?key=2mBcZ.ELWiNKUszF38h36BDELYHt5OUhI_xaqJbN0BJqusAh9l4HMR6Z8xCckDDafF66sOxJ5rzX4iMFWWOvfg-- | |
コノハナサクヤ |
String Symbol 展開
リプレイ保存、再生
データ圧縮は
MessagePack 、LZMA
このあたりを試す