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
/* | |
エクセル列名変換問題 | |
NOTE: | |
A = 1, B = 2, ..... | |
AA = 27..... | |
XFD = 16384 | |
@created at: 2012-01-31 | |
@author: lithtle |
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
# ignore files | |
a.out* |
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
#! /usr/bin/ruby -Ku | |
include Math | |
KINDS = 10 # 景品の種類 | |
COST = 300 # 一回の料金 | |
class Gacha | |
def initialize() |
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
*~ | |
sample10* | |
sample100* | |
sample1000* | |
sample10000* | |
sample100000* |
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
#! /usr/bin/ruby -Ku | |
# -*- coding:utf-8 -*- | |
# 突然の死(AA略 を表示して遊ぶ | |
# | |
# Date:: 2012-06-07 | |
# Author:: lithtle | |
# Copyright:: copyright (c) 2012 lithtle | |
# Example:: | |
# _人人人人_ |
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
rspec の練習 | |
http://d.hatena.ne.jp/t-wada/20100228/p1 より |
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
# -*- coding:utf-8 -*- | |
Inf = 1.0 / 0 | |
class Operator | |
def initialize(a, b) | |
@left = a | |
@right = b | |
end | |
attr_reader :left, :right |
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
#! /usr/bin/env ruby -Ku | |
# -*- coding: utf-8 -*- | |
# なるべく少ない回数で指定した重さのものをある一定の重さ(>=1.0)以上にするのに | |
# 必要な羽の生えた巻物の試行回数と重さを計算する | |
# 祝福羽の生えた巻物と通常時の巻物の重さ軽減倍率 | |
RATIO = { | |
"blessed" => 0.78, | |
"normal" => 0.85 |
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
#! /usr/bin/env ruby -Ku | |
# -*- coding:utf-8 -*- | |
def range(s, e, jump=1) | |
(s...e).step(jump) do |i| | |
yield i | |
end | |
end | |
# test |

OlderNewer