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
module Gominashi | |
SOURCES = [ | |
{ | |
name: "chuo_1", | |
areas: [ | |
"中央区 南4条西7丁目・8丁目(南4条通の南側のみ),札幌センター1", | |
"中央区 南5条~8条の西7丁目・8丁目,札幌センター1", | |
"中央区 南9条西4丁目~6丁目(南9条通の南側のみ),札幌センター1", | |
"中央区 南9条西7丁目~12丁目,札幌センター1", | |
"中央区 南10条~13条の西5丁目~12丁目,札幌センター1", |
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
require "groonga" | |
require "gtk2" | |
class Window < Gtk::Window | |
def initialize(db_path) | |
super() | |
set_default_size(640, 480) | |
@grn_database = Groonga::Database.open(db_path) | |
signal_connect("destroy") do | |
@grn_database.close unless @grn_database.closed? |
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
require "clutter" | |
require "gdk_pixbuf2" | |
module Pixlutter | |
class Window | |
attr_reader :files | |
def initialize(file) | |
@files = [file] | |
@stage = create_stage | |
@box = create_box(@stage) |
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 fib(n) { | |
var a = 0; | |
var b = 1; | |
for (var i = 0; i < n; i++) { | |
var _a = a; | |
a = b; | |
b = _a + b; | |
} | |
return 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
% git pull | |
remote: Counting objects: 127, done. | |
remote: Compressing objects: 100% (42/42), done. | |
remote: Total 42 (delta 33), reused 0 (delta 0) | |
Unpacking objects: 100% (42/42), done. | |
From git://toshia.dip.jp/mikutterなんぞ | |
7aed49a..0790823 master -> origin/master | |
7aed49a..0790823 develop -> origin/develop | |
* [new branch] hotfix/3.0 -> origin/hotfix/3.0 | |
* [new tag] 3.0.1 -> 3.0.1 |
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
require "cairo" | |
# http://www.dafont.com/ubuntu-title.font | |
FONT = "Ubuntu-Title" | |
# http://www.dafont.com/fifa-welcome.font | |
#FONT = "FIFA Welcome" | |
def draw(context, width, height, text) | |
context.save do | |
context.set_source_color(:black) |
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
require "cairo" | |
def draw_bowl(context, width, height) | |
context.save do | |
context.set_source_color(:black) | |
context.scale(width, height) | |
context.line_width = 0.01 | |
fill_inner(context) | |
fill_outer(context) |
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
= ひどか(仮) | |
= ひどかとは | |
* 「ひ」とり | |
* 「ど」くしょ(読書) | |
* 「か」い(会) | |
= 読書とは |
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
require "test-unit" | |
class RegexpTest < Test::Unit::TestCase | |
def setup | |
@regexp = /\bCairo(?:::[A-Z][\w\d_]+)*(?:[#.][\[_@\w\d]*(?:[=?!_*+\-\]]|\b)|\b)/ | |
end | |
def test_front | |
line = "Cairo::Contextはrcairoで描画するときに使用する主要なオブジェ\n" | |
assert_equal(["Cairo::Context"], line.gsub(@regexp).to_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
require "cairo" | |
module Cairo | |
class Context | |
def show_graph(graph) | |
graph.draw(self) | |
end | |
end | |
class Graph |