2007-04-01から1ヶ月間の記事一覧
CentOS使う人にとっては、このサイト良い。○CentOS で構築する自宅サーバ http://centos.oss.sc/
わかりやすい。http://centos.oss.sc/ruby/gems/
gem install rails --version 1.1.6 --include-dependencies↑コンナ感じ。
出てたんだ...。ruby 1.8.5 が入ってるし。ナイス。 http://isoredirect.centos.org/centos/5/isos/i386/CentOS http://www.centos.org/
目的 : .mobi で2文字のドメインは取得可能なのか結論:できないっぽい理由: http://whois.mtld.mobi/index.phpで2文字で登録しようとすると、「Invalid Query Format. Domains must be at least three characters in length.」と言われる。http://whois.mt…
モデルでテーブル間のリレーションを宣言するときの注意。>ややこしいのが参照先テーブル名の指定で、 belongs_to と has_one では単数形、 has_many と has_many_and_belongs_to では複数形で記述しなければなりません。 リレーションは、最初ややこしい..…
cat /path_to/access_log | awk '{print $4}' | sort | uniq -c | less
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…
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倍か…
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…
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 #=> 界王拳…
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とオブジ…
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クラスの特異メソッドをクラスメソッドと呼びま…
3.メソッドの実行亀仙人(Kamesennin)と悟空(Goku)達本人は実は技を使えません。 class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end def kamehameha print "界王拳4倍かめは…
2.継承とは 継承とは「別のクラスの特徴を受け継ぐこと」○差分プログラミング class Kamesennin def kamehameha print "かめはめ波!" end end class Goku < Kamesennin def shunkanidou print "瞬間移動!" end end goku = Goku.new goku.kamehameha #=>…
1.メッセージ 〜オブジェクトは「問いかけたらきちんと返事をしてくれる」〜 print var1 var1.class #=> String上記の例だと、var1 がオブジェクト "class" がメッセージ。 "class"というメッセージを送ることで、オブジェクトの素性(クラス)情報を得る…
○synth_jp_alert.user.js
ファイル名は ○○.user.js と user.js を付ける。 あとは、FireFoxにドラックアンドドロップすればよい。
おおおおぉぉhttp://www.popxpop.com/archives/2007/04/ruby_on_railsrails_road.htmlhttp://railroad.rubyforge.org/使い方とか http://blog.takeda-soft.jp/blog/show/157
SELECT subject FROM topics WHERE subject ~* 'JBUILDER';http://www.devdaily.com/blog/Content/2/7/62/
>Gimp(GNU Image Manipulation Program)は、Photoshop にも匹敵する機能を備えた無料の画像編集ソフトです。GIMP ダウンロード http://www.geocities.jp/gimproject2/download/gimp-download.htmlGIMP入門 http://www.tohoho-web.com/wwwgimp.htm