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

rubyÃüÁîÐнâÎö

   ¿ÉÓÿ⣺getoptlong.rs£¬ optionparser
   ¶ÔÓ¦ÀࣺGetoptLong,  OptionParser
   ǰÕßÒѹýʱ£¬½¨ÒéʹÓúóÕߣ¬ÇÒºóÕß±ÈǰÕßÒ×Óá£
ºóÕßÌØµã£º
1. ²ÎÊýÃèÊöºÍ´úÂë´¦ÀíдÔÚÒ»Æð
2. Êä³ö²ÎÊý˵Ã÷£¬²»Ðèµ¥¶Àά»¤
3. ¿ÉÑ¡²ÎÊýºÍÃüÁî²ÎÊýÃèÊö¼ò½à
4. ²ÎÊý¿É×Ô¶¯×ª»»ÎªÌض¨µÄÀà
5. ²ÎÊý¿ÉÏÞÖÆÔÚij¸ö¼¯ºÏÖÐ
**************************************************************************
**************API£¨1.8.6£©ÖеÄÀý×Ó: example.rb**********************
  require 'optparse'
  require 'optparse/time'
  require 'ostruct'
  require 'pp'
  class OptparseExample
    CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary]
    CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" }
    #
    # Return a structure describing the options.
    #
    def self.parse(args)
      # The options specified on the command line will be collected in *options*.     ÃüÁîÐеÄÑ¡ÏîÔÚoptions½á¹¹ÌåÖÐ
      # We set default values here.
      options = OpenStruct.new
      options.library = []
      options.inplace = false
      options.encoding = "utf8"
      options.transfer_type = :auto
      options.verbose = false
      opts = OptionParser.new do |opts|
        opts.banner = "Usage: example.rb [options]"
        opts.separator ""
        opts.separator "Specific options:"
        # Mandatory argument.
        opts.on("-r", "


Ïà¹ØÎĵµ£º

Rubyѧϰ±Ê¼ÇÒ»——ÓïÑÔ»ù´¡


#Ò»¡¢ÕâÀïÊÇ×¢ÊÍ£¬Êǵ¥ÐÐ×¢ÊÍ£¬ÀàËÆÓÚ//
puts 3/5#ÕâÀïÊÇÕûÊýÐÎʽµÄ½á¹û
puts 3/5.0#ÕâÀïÊÇСÊýÐÎʽµÄ½á¹û
=begin
  ÕâÊǶàÐÐ×¢ÊÍ£¬Êµ¼ÊÉÏÕâÒ²ÊÇRubyÄÚǶÎĵµ¸ñʽ£¬ÀàËÆÓÚJava doc
  =end²»µ«ÒªÓÐÆðÖ¹£¬»¹ÒªËõ½ø²ÅÓÐÓá£
=end
#¶þ¡¢Á¬ÐÐ
puts "Hello Ruby!"; puts "This is a "\
"String";# ......

×ªÔØ——Ruby×Ö·û´®´¦Àí

ת×Ô£ºhttp://developer.51cto.com/art/200912/170762.htm 
Ruby×Ö·û´®´¦Àíº¯Êý×ܽáÁбí·ÖÏí
Ruby×Ö·û´®´¦Àíº¯Êý°üÀ¨·µ»Ø×Ö·û´®³¤¶Èº¯Êý£»ÅжÏ×Ö·û´®ÖÐÊÇ·ñ°üº¬ÁíÒ»¸ö´®º¯Êý£»×Ö·û´®²åÈ룻×Ö·û´®·Ö¸ô,ĬÈÏ·Ö¸ô·ûΪ¿Õ¸ñµÈµÈ¡£
 
str.length => integer 
str.include? other_str
&nbs ......

Install Cassandra with Ruby 1.9.1 on Windows

To get it done is not easy. I spent a whole day to figure out the various compatibility issues along the way out.
Now there still might be potential issues, but it works by my rough test.
Step 1: Install Apache Cassandra
  You may know that the Ruby gem cassandra will do it for you.
  ......

ѧrubyÓиÐ(by Íõå«)

    ѧÁËÒ»¸öѧÆÚµÄCÓïÑÔ£¬¿´ÁËÒ»¸öÐÇÆÚµÄruby£¬ÎҲŷ¢ÏÖΪʲôÀÏʦ˵CÊÇ×î»ù´¡µÄ£¬¼ÙÈçûÓÐÒ»¸öѧÆÚµÄC»ù´¡£¬ÄÇrubyÎÒÒ²²»Óÿ´ÁË¡£
        RubyºÍCÓïÑÔÓÐÐí¶àµÄÏàͬµãºÍ²»Í¬µã£¬ÔÚѧϰrubyʱ£¬ÓÐʱ¿ÉÒÔÓÃCÀïÃæµÄ˼άÀ´Àí½â£¬¾ÍÏñrubyÀïÃæµÄ·½·¨Æäʵ¾Í¸úCµÄº¯ÊýÈç³öÒ» ......

Ruby ¼ò½é

    Ruby£¬Ò»ÖÖ為簡單¿ì½ÝÎï¼þ導Ïò編³Ì£¨ÃæÏò¶ÔÏó³ÌÐòÉè¼Æ£©¶ø創µÄ½Å±¾語ÑÔ£¬ÔÚ20ÊÀ¼Í90Äê´úÓÉÈÕ±¾ÈËËɱ¾Ðк루¤Þ¤Ä¤â¤È¤æ¤­¤Ò¤í£¯Yukihiro Matsumoto£©¿ª·¢£¬×ñÊØGPLЭÒéºÍRuby License¡£ËüµÄÁé¸ÐÓëÌØÐÔÀ´×ÔÓÚPerl¡¢Smalltalk¡¢Eiffel¡¢Ada ÒÔ¼° Lisp ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ