evalbookのURL
#スライド
#元ページ http://archive.wiredvision.co.jp/blog/masui/
#出力サンプル
| require 'dxruby' | |
| def simpleHash(x) | |
| x = x * 1103515245 + 12345 | |
| return x & 2147483647 | |
| end | |
| Window.width = 640 | |
| Window.height = 480 | |
| Window.bgcolor = [0, 0, 0] |
| set nocompatible "vi非互換モード | |
| "####################### | |
| " 表示系 | |
| "####################### | |
| set number "行番号表示 | |
| set showmode "モード表示 | |
| set title "編集中のファイル名を表示 | |
| set ruler "ルーラーの表示 | |
| set showcmd "入力中のコマンドをステータスに表示する |
| export PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
| export PTEX_IN_FILTER="/opt/local/bin/nkf -j" | |
| # PROMPT | |
| PS1="[@${HOST%%.*} %1~]%(!.#.$) " # この辺は好み | |
| RPROMPT="%T" # 右側に時間を表示する | |
| setopt transient_rprompt # 右側まで入力がきたら時間を消す | |
| setopt prompt_subst # 便利なプロント | |
| bindkey -e # emacsライクなキーバインド |
| Index: test/main/util/DefragUtilTest.java | |
| =================================================================== | |
| --- test/main/util/DefragUtilTest.java (リビジョン 0) | |
| +++ test/main/util/DefragUtilTest.java (リビジョン 5) | |
| @@ -0,0 +1,75 @@ | |
| +/* | |
| + * To change this template, choose Tools | Templates | |
| + * and open the template in the editor. | |
| + */ | |
| + |
| Random#randとKernel#randで引数としてRangeを扱えるようにしてほしいです。 | |
| Random#randは引数にInteger, Float, Rangeを扱うことができるのに対し、Kernel#rand, Random.randではIntegerしか扱うことができません。 | |
| rand 10 #=> 7 | |
| rand 7.5 #=> 4 | |
| rand 10..20 #=> TypeError: can't convert Range into Integer | |
| Random.rand 10 #=> 8 | |
| Random.rand 7.5 #=> 3 |
| class YbookMLParser | |
| prechigh | |
| left CHARACTER | |
| nonassoc LOW | |
| preclow | |
| rule | |
| target : text { p val[0] } | |
| | /* none */ { "" } | |
| text : text string { result = val[0] + val[1] } |
evalbookのURL
#スライド
#元ページ http://archive.wiredvision.co.jp/blog/masui/
#出力サンプル
| diff --git a/config.sample.yml b/config.sample.yml | |
| index 0dab043..5ed6aa8 100644 | |
| --- a/config.sample.yml | |
| +++ b/config.sample.yml | |
| @@ -1,5 +1,5 @@ | |
| production: | |
| - dsn: <%= ENV['DATABASE_URL'] || ENV['DUOSTACK_DB_MYSQL'] %> | |
| + dsn: mysql://sampleuser:samplepassword@localhost/db_name | |
| development: | |
| dsn: sqlite3://<%= root %>/db/development.sqlite3 |