This file contains hidden or 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 | |
# | |
# input: | |
# Fullname [TAB] College [TAB] Prefecture [TAB] School code [TAB] School name | |
# | |
require 'CSV' | |
require 'pp' | |
require 'nkf' |
This file contains hidden or 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
// add following HTML to your HTML file. | |
// <div id="pankuz"></div> | |
// <script type="text/javascript" src="pankuz.js"></script> | |
// definition of each pages | |
table = { | |
"foo.github.ac.jp": { | |
"name": "foo github", | |
"directory": { | |
"name": "the title of this directory", |
This file contains hidden or 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
#lang racket/gui | |
; DrRacket, version 5.2.1 | |
; 情報科学類ソフトウェアサイエンス主専攻実験 | |
; M.NAKAJIMA | |
; 2012/06/29 | |
; Create a window and show message. | |
(define frame (new frame% [label "Timer"])) | |
(define msg (new message% [parent frame] |
This file contains hidden or 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
# generate a file (1000 lines) | |
def make_1000lines | |
f = open("hoge", 'w') | |
1000.times do |i| | |
f.puts i.to_s * 100 | |
end | |
end | |
make_1000lines() | |
puts `wc -l hoge` # 989 is printed in my environment. |
This file contains hidden or 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
l = gets | |
l.chomp! | |
while /^(.+)\1+/ =~ l | |
l = $1 | |
end | |
puts l |
This file contains hidden or 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
l = gets | |
num_list = l.split(/\s/) | |
n = Math.sqrt(num_list.size).to_i | |
print '{' | |
n.times { | |
print '{' | |
(n-1).times { | |
print "%s, " % num_list.shift | |
} |
This file contains hidden or 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
% komachi | |
digit(X) :- member(X, [0,1,2,3,4,5,6,7,8,9]). | |
is_composed_of(N, X, Y) :- | |
digit(X), | |
digit(Y), | |
(Z is X+Y; | |
Z is X-Y; | |
Z is Y-X; |
This file contains hidden or 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
include Math | |
require 'pp' | |
X = 10 | |
T = 4 | |
PI = 3.14 | |
dt = 1 | |
dx = 1 |
This file contains hidden or 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
% スライドパズルの移動のルール | |
move_one([0,B,C,D,E,F,G,H,I], [B,0,C,D,E,F,G,H,I]). | |
move_one([A,0,C,D,E,F,G,H,I], [0,A,C,D,E,F,G,H,I]). | |
move_one([0,B,C,D,E,F,G,H,I], [D,B,C,0,E,F,G,H,I]). | |
move_one([A,B,C,0,E,F,G,H,I], [0,B,C,A,E,F,G,H,I]). | |
move_one([A,0,C,D,E,F,G,H,I], [A,C,0,D,E,F,G,H,I]). | |
move_one([A,B,0,D,E,F,G,H,I], [A,0,B,D,E,F,G,H,I]). | |
move_one([A,0,C,D,E,F,G,H,I], [A,E,C,D,0,F,G,H,I]). | |
move_one([A,B,C,D,0,F,G,H,I], [A,0,C,D,B,F,G,H,I]). |
This file contains hidden or 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
[~/work/now/mlr/third_party/dtm_release/dtm]$ gdb main haro@harombp 2013/09/27 10:19:13 | |
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011) | |
Copyright 2004 Free Software Foundation, Inc. | |
GDB is free software, covered by the GNU General Public License, and you are | |
welcome to change it and/or distribute copies of it under certain conditions. | |
Type "show copying" to see the conditions. | |
There is absolutely no warranty for GDB. Type "show warranty" for details. | |
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ..... done | |
(gdb) run |
OlderNewer