Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ruby ×Ö·û´® Àí½â "" ''

rubyÖе¥ÒýºÅºÍË«ÒýºÅµÄÒâÒåÓÐËù²»Í¬£¬Ë«ÒýºÅ°üΧµÄ×Ö·û×÷±äÁ¿Ìæ»»£¬µ¥ÒýºÅ°üΧµÄ±äÁ¿²»×öÌæ»»
Ò²¿ÉÒÔʹÓà %q ºÍ %Q À´Éú³É×Ö·û´®¶ÔÏó¡£%q Ï൱ÓÚµ¥ÒýºÅ£¬%QÏ൱ÓÚË«ÒýºÅ¡£
¾ÙÀýÈçÏ£º
irb(main):010:0> "show trsult: #{1*3}"
=> "show trsult: 3"
irb(main):011:0> 'show trsult: #{1*3}'
=> "show trsult: \#{1*3}"


Ïà¹ØÎĵµ£º

дµÄÒ»¸öinterÀàÄ£·ÂrubyÕûÊýµÄÐÐΪ

ÎÒÃÇÖªµÀrubyÖжÔÓÚÕûÊýµÄ[],[]=,<<,>>²Ù×÷ÊÇÕë¶ÔÓÚ¶þ½øÖƵÄÖµÀ´ÔËËãµÄ¡£
ÎÒÏÖÔÚдһ¸öÕë¶ÔÊ®½øÖÆÊý²Ù×÷µÄÀ࣬ӵÓÐÕûÊýµÄËùÓз½·¨£¬ÈçÏÂ:
class InterEx
def initialize(val=0)
@val=val
end

def to_s
@val.to_s
end

def [](idx)
self.to_s[idx].to_i
end

d ......

Use lambda in Ruby ¾ÅͲһÌõ

http://www.robertsosinski.com/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/
Understanding Ruby Blocks, Procs and Lambdas
Blocks, Procs and lambdas (referred to as closures
in Computer Science) are one of the most powerful aspects of Ruby, and
also one of the most misunderstood. This ......

RubyϽâ¾öoci8°²×°´íÎóµÄÎÊÌâ

Prepare
1. Download 'OCI 1.x.x.rb' (it's VERY important - execution MUST be *.rb)
2. Download 'oci8lib.so'
Install
1. Copy 'OCI8.rb' to .../ruby/lib/ruby/site_ruby/1.8/DBD/OCI8
2. Copy 'oci8.rb' to .../ruby/lib/ruby/site_ruby/1.8
3. Copy 'oci8lib.so' to .../ruby/lib/ruby/site_ruby/1.8/i386-msv ......

Cassandra in Action with Twitter's Ruby Client

ÓÐÒ»¸öȫеÄÏîÄ¿£¬ÒòΪ¿¼Âǵ½½«À´µÄÊý¾ÝÀ©Õ¹ÐÔÄÜ£¬ËùÒÔ¿¼ÂÇÓÃCassandra×öÊý¾Ý´æ´¢£¬Ç°¶ËÓÃLighttpd + FastCGI + Rails¡£ÔÚʹÓÃCassandraµÄʱºò£¬¾õµÃÓÐһЩ¶«Î÷¿ÉÄÜ´ó¼Ò¶¼ÐèÒª£¬¾ÍдÁËÒ»¸ö¼òµ¥µÄÖ¸ÄÏ¡£ÒòΪÄÚÈݱȽϳ¤£¨16Ò³£©£¬¾ÍŪÁ˸öPDFÎļþ¸ø´ó¼ÒÏÂÔØ¡£
Cassandra in Action with Twitter's Ruby Client.pdf
Èç¹ûÏÂÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ