./configure --help
./configure --enable-shared
Eclipse
http://ja.netbeans.org/
gem install ruby-debug-ide
/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin
ln -s /Library/Ruby/Gems/1.8/gems/ruby-debug-ide-0.1.9/bin/rdebug-ide
http://completemirage.blog55.fc2.com/blog-entry-39.html
#
=begin =end
p "hoge".object_id == "hoge".object_id >false p :hoge.object_id == :hoge.object_id >true
class TestClass
attr_accessor :name1
attr_accessor :name2
def initialize()
@test = Array.new
@test.push("aaaa")
@test.push("bbb")
@test.push("ccc")
end
def hoge
yield(10,20)
yield(10,20)
end
def hoge2
@test.each{|tes|
yield(tes)
}
end
def hoge3
yield(name1,name2)
end
end
testclass = TestClass.new
testclass.hoge{|x,y| p x*y}
testclass.hoge2{|aa| p aa.length}
testclass.hoge3{|aa,bb| puts aa+bb}
200 200 4 3 3 false true
require 'pp'
pp hoge
p hoge.methods p hoge.public_methods p hoge.private_methods p hoge.protected_methods
a = [10, 20, 30, 40, 50]
a.map! {|x| x*10}
p a #=>[100, 200, 300, 400, 500]
a.map {|x| x*10}
p a #=>[100, 200, 300, 400, 500]
newcart = Marshal.load(Marshal.dump(cart))
query_hash = Hash.new
query_hash["va"] = "hoge"
query_string = query_hash.map{|key,value|
"#{URI.encode(key)}=#{URI.encode(value)}"
}.join("&")
begin
Net::HTTP.start('search.yahoo.co.jp', 80) {|http|
response = http.post('/web/advanced',query_string)
p response.body
}
rescue
puts "exception on HTTP: #{$!}"
end
require 'mechanize'
agent = WWW::Mechanize.new
page = agent.get('http://search.yahoo.co.jp/web/advanced')
form = page.forms.first
form.va = "hoge"
res = agent.submit(form)
resbody = res.body
p resbody
hashhoge2 = hashhoge.sort_by{|key,val|val}
http://wiki.rubyonrails.com/rails/pages/RailsOnFedora
http://osakanas.blog19.fc2.com/blog-entry-67.html
http://www.goodpic.com/mt/archives2/2005/10/fedora_core_3_r.html
gem install mysql -- --with-mysql-dir=/usr/local/mysql
;C:\Program Files\MySQL\MySQL Server 5.0\bin;
http://www.postgresql.jp/interfaces/ruby/index-ja.html