2007-04-01から1ヶ月間の記事一覧

CentOS で構築する自宅サーバ

CentOS使う人にとっては、このサイト良い。○CentOS で構築する自宅サーバ http://centos.oss.sc/

RubyGems の導入

わかりやすい。http://centos.oss.sc/ruby/gems/

rails 特定のバージョンを指定してインストール

gem install rails --version 1.1.6 --include-dependencies↑コンナ感じ。

CentOS 5.0

出てたんだ...。ruby 1.8.5 が入ってるし。ナイス。 http://isoredirect.centos.org/centos/5/isos/i386/CentOS http://www.centos.org/

.mobi ドメインは2文字で登録できないのか

目的 : .mobi で2文字のドメインは取得可能なのか結論:できないっぽい理由: http://whois.mtld.mobi/index.phpで2文字で登録しようとすると、「Invalid Query Format. Domains must be at least three characters in length.」と言われる。http://whois.mt…

Ruby on Rails : テーブル間リレーションシップ

モデルでテーブル間のリレーションを宣言するときの注意。>ややこしいのが参照先テーブル名の指定で、 belongs_to と has_one では単数形、 has_many と has_many_and_belongs_to では複数形で記述しなければなりません。 リレーションは、最初ややこしい..…

Apacheアクセスログで集中してアクセスのある時間帯がないか調べる

cat /path_to/access_log | awk '{print $4}' | sort | uniq -c | less

Rubyとオブジェクト指向についてアウトプットしてみる【委譲】

9.委譲 require 'forwardable' class Kuririn def kienzan print "気円斬!" end def mekuramashi print "目くらまし!" end end class Gohan extend Forwardable def initialize @q = Kuririn.new end #気円斬を Kuririnに委譲(任せる) def_delegator :@q…

Rubyとオブジェクト指向についてアウトプットしてみる【Mixin(extend)】

8.Mixin(extend) module Hiden_of_Kuririn def kienzan print "気円斬!" end end class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end def kamehameha print "界王拳4倍か…

Rubyとオブジェクト指向についてアウトプットしてみる【Mixin(include)】

7.Mixin(include) module Hiden_of_Kuririn def kienzan print "気円斬!" end end class Kamesennin include Hiden_of_Kuririn def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end def kame…

Rubyとオブジェクト指向についてアウトプットしてみる【オーバーライド】

6.オーバーライド class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end def kamehameha print "界王拳4倍かめはめ波" end end goku1 = Goku.new goku1.kamehameha #=> 界王拳…

Rubyとオブジェクト指向についてアウトプットしてみる【特異クラス】

5.特異クラス class Foo def hello print "hello.\n" end end foo = Foo.new foo.hello #=>hello. class << foo attr :name, true def hello print "hello. I'm ", @name, ".\n" end end foo.name = "Tom" foo.hello #=>hello. I'm Tom.参考 ○Rubyとオブジ…

Rubyとオブジェクト指向についてアウトプットしてみる【特異メソッド】

4.特異メソッド#特異メソッド class Foo def Foo.test print "this is foo\n" end end Foo.test #=>this is foo #通常 class Foo def test print "this is foo\n" end end o = Foo.new o.test #=>this is fooクラスの特異メソッドをクラスメソッドと呼びま…

Rubyとオブジェクト指向についてアウトプットしてみる【メソッドの実行】

3.メソッドの実行亀仙人(Kamesennin)と悟空(Goku)達本人は実は技を使えません。 class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end def kamehameha print "界王拳4倍かめは…

Rubyとオブジェクト指向についてアウトプットしてみる【継承とは】

2.継承とは 継承とは「別のクラスの特徴を受け継ぐこと」○差分プログラミング class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end end goku = Goku.new goku.kamehameha #=>…

Rubyとオブジェクト指向についてアウトプットしてみる【メッセージ】

1.メッセージ 〜オブジェクトは「問いかけたらきちんと返事をしてくれる」〜 print var1 var1.class #=> String上記の例だと、var1 がオブジェクト "class" がメッセージ。 "class"というメッセージを送ることで、オブジェクトの素性(クラス)情報を得る…

はじめてのGreasemonkey

○synth_jp_alert.user.js

greasemonkey の memo

ファイル名は ○○.user.js と user.js を付ける。 あとは、FireFoxにドラックアンドドロップすればよい。

Ruby On Railsのクラスを解析してダイアグラムにしてくれる『Rails Road』

おおおおぉぉhttp://www.popxpop.com/archives/2007/04/ruby_on_railsrails_road.htmlhttp://railroad.rubyforge.org/使い方とか http://blog.takeda-soft.jp/blog/show/157

How to do case-insensitive searching with Postgresql

SELECT subject FROM topics WHERE subject ~* 'JBUILDER';http://www.devdaily.com/blog/Content/2/7/62/

GIMP

>Gimp(GNU Image Manipulation Program)は、Photoshop にも匹敵する機能を備えた無料の画像編集ソフトです。GIMP ダウンロード http://www.geocities.jp/gimproject2/download/gimp-download.htmlGIMP入門 http://www.tohoho-web.com/wwwgimp.htm