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
// 「ようかいしりとり」の状態遷移図 | |
// 作成者: takehikom (http://d.hatena.ne.jp/takehikom/) | |
// 歌詞参照: http://plaza.rakuten.co.jp/ribbon1976/diary/201311210002/ | |
digraph youkaishiritori { | |
// node[fontname="ms gothic"]; // Windowsではコメントを外す | |
"ようかいはかせの ところに" -> | |
"ろくろっくびが やってきた" -> | |
"ようかいしりとり しようかい?" -> |
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
// 「ようかいしりとり」の状態遷移図2 | |
// 作成者: takehikom (http://d.hatena.ne.jp/takehikom/) | |
// 歌詞参照: http://plaza.rakuten.co.jp/ribbon1976/diary/201311210002/ | |
digraph youkaishiritori { | |
// node[fontname="ms gothic"]; // Windowsではコメントを外す | |
n1 [label = "ようかいはかせの ところに"]; n1 -> | |
"ろくろっくびが やってきた" -> | |
"ようかいしりとり しようかい?" -> |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>トライアングル3分割</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<style type="text/css" > | |
.thinline { fill:none; stroke:black; stroke-width:1; } | |
.thickline { fill:none; stroke:black; stroke-width:2; } | |
</style> |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Regular Polygons</title> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> |
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 | |
# -*- coding: utf-8 -*- | |
# Makes a "Hello, world!" program that has no literals. | |
class HelloWorldGenerator1 | |
def initialize(s = "Hello, world!") | |
@message = s.chomp + "\n" | |
end |
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 | |
# ruby magicsquare.rb | |
# ruby magicsquare.rb -c | |
# ruby magicsquare.rb 2 | |
# ruby magicsquare.rb 3 | |
module MagicSquare | |
class Table | |
def initialize(t = nil) |
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
# kukuplot.R - Kuku (a.k.a. multiplication table) Answer Accuracy | |
# by takehikom | |
# http://berd.benesse.jp/berd/center/open/report/keisanryoku/2013/pdf/keisanryoku_2013_data_all.pdf#page=15 | |
# http://i.imgur.com/tE4ncBy.gif | |
# http://qiita.com/wakuteka/items/c5910a54273d05577c5d | |
library(lattice) | |
kuku.acc <- 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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# TrianglePuzzleSolver.rb | |
# by takehikom | |
# inspired by: | |
# http://www.huffingtonpost.jp/satoshi-kagimoto/triangle-puzzle_b_5590269.html | |
module TrianglePuzzle |
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 | |
# -*- coding: utf-8 -*- | |
# TrianglePuzzleSolver5x5.rb | |
# by takehikom | |
# inspired by: | |
# http://www.ksproj.com/PDF/chirashi201405.pdf | |
# NOTE: Since we get 4354560 patterns (whereas TrianglePuzzleSolver.rb |
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 | |
# -*- coding: utf-8 -*- | |
# trips.rb - Triangle Puzzle Solver | |
# by takehikom | |
# inspired by: | |
# http://www.huffingtonpost.jp/satoshi-kagimoto/triangle-puzzle_b_5590269.html | |
# ruby trips.rb |
OlderNewer