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
Amulets | |
R - an uncursed amulet of reflection named Sokoban (being worn) | |
----------- -------- ----------- Weapons | |
------- |.........| |.....%+# ##..........| w - the blessed rustproof +7 Excalibur (weapon in hand) | |
|...|.| |...).)...-# |......|# # |.....>...| x - the blessed rustproof +7 Mjollnir | |
|....^| |..*......|# #.......|# ####..........| V - a blessed +7 silver saber (wielded in other hand) | |
|.....| |.....).`.|# #--------# # --.-------- Armor | |
|.....| #......)...|# #### % # #### A - a blessed +4 gray dragon scale mail (being worn) | |
|.....| ### ###-----------* # % # # # # |
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 | |
ALL_CARDS = [ | |
{id: '1', short_name: '農', name: '農村'}, | |
{id: '2', short_name: '都', name: '都市'}, | |
{id: '3', short_name: '大', name: '大都市'}, | |
{id: 'x', short_name: 'ダ', name: '見習い侍女'}, | |
] | |
CARD_FROM_ID_TABLE = Hash[ALL_CARDS.map {|c| [c[:id], c]}] |
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
javascript:(function(){var dialog=document.createElement("div");var setUpDialog=function(){dialog.style.position="fixed";dialog.style.bottom="0";dialog.style.left="10%";dialog.style.width="80%";dialog.style.color="#333";dialog.style.background="#efe";dialog.style.border="thin solid #9a9";dialog.style.margin="0 0 0.5em";dialog.style.padding="0.5em 1em";dialog.style.fontFamily="monospace";document.getElementsByTagName("body")[0].appendChild(dialog)};var notify=function(message){dialog.textContent=message};var loadJavaScript=function(uri){var script=document.createElement("script");script.setAttribute("type","text/javascript");script.setAttribute("src",uri);document.getElementsByTagName("body")[0].appendChild(script)};var isJQueryLoaded=function(){return window.jQuery!==undefined};var waitLoadingJQuery=function(continuation){var tryCount=0;var step=function(){if(isJQueryLoaded())continuation();else{tryCount++;setTimeout(step,tryCount*100);notify("Loading"+(new Array(tryCount+1)).join("."))}};step()};var getXPath |
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
import Data.List | |
data Card = | |
Nouson | |
| Toshi | |
| Daitoshi | |
| MinaraiJijo | |
| YakihataNougyo | |
deriving (Eq, Show) |
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
from itertools import chain | |
RULES = { | |
1: {2: 3, 4: 7, 5: 9}, | |
2: {5: 8}, | |
3: {2: 1, 5: 7, 6: 9}, | |
4: {5: 6}, | |
5: {}, | |
6: {5: 4}, | |
7: {4: 1, 5: 3, 8: 9}, |
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
yl 現在のマスの状態を調べる | |
@= | |
@0=="G" ゴールに着いた? | |
? "maGD\"=@-+1\rP`a" 見つかった解の数を+1する。 | |
: @0==" " 通路に居る? | |
? "r.l@1hj@1kh@1lk@1jr " 今のマスを訪問済みにマーク(r.)して、十字隣接するマスを調べて(l@1h...)、今のマスを未訪問に戻す(r )。 | |
: "" 冒険は終わった。 |
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
(a) | |
.---------. .--..--..--. .---------. | |
| ラ | ラ | |カ||カ||カ| | サ |姫ト| | |
|----+----| `--'`--'`--' |----+----| | |
| ラ | ラ | .------. | 呪 | 侍 | | |
|----+----| | 国外 | |----+----| | |
| ラ | ラ | `------' | 都 | 議 | | |
|----+----| .--..--..--. |----+----| | |
| ラ | ラ | |カ||カ||カ| | 大 | 爵 | | |
`---------' `--'`--'`--' `---------' |
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
:function! F() | |
let xs = [2] | |
let i = 3 | |
while len(xs) < 100 | |
if empty(filter(copy(xs), 'i % v:val == 0')) | |
call add(xs, i) | |
endif | |
let i += 1 | |
endwhile | |
put =xs |
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
S 1qa>>Ypq540@aQg/\v^( +)\1+\d/d | |
%s/ //g | |
wq |
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
begin | |
original_foo = foo | |
foo = ya_foo | |
begin | |
original_bar = bar | |
bar = snack_bar | |
do_something | |
ensure | |
bar = original_bar | |
end |