Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : Ruby

Ruby ¼ò½é

    Ruby£¬Ò»ÖÖ為簡單¿ì½ÝÎï¼þ導Ïò編³Ì£¨ÃæÏò¶ÔÏó³ÌÐòÉè¼Æ£©¶ø創µÄ½Å±¾語ÑÔ£¬ÔÚ20ÊÀ¼Í90Äê´úÓÉÈÕ±¾ÈËËɱ¾Ðк루¤Þ¤Ä¤â¤È¤æ¤­¤Ò¤í£¯Yukihiro Matsumoto£©¿ª·¢£¬×ñÊØGPLЭÒéºÍRuby License¡£ËüµÄÁé¸ÐÓëÌØÐÔÀ´×ÔÓÚPerl¡¢Smalltalk¡¢Eiffel¡¢Ada ÒÔ¼° Lisp ÓïÑÔ¡£ÓÉ Ruby ÓïÑÔ±¾Éí»¹·¢Õ¹³öÁËJRuby£¨Java Æ½Ì¨£©¡¢IronRuby£¨.NET Æ½Ì¨£©µÈÆäËûƽ̨µÄ Ruby ÓïÑÔÌæ´úÆ·¡£
    RubyµÄ×÷Õßì¶1993Äê2ÔÂ24ÈÕ開ʼ編寫Ruby£¬Ö±ÖÁ1995Äê12Ô²ÅÕýʽ¹«開發佈ì¶fj£¨ÐÂ聞Ⱥ組£©¡£Ö®ËùÒÔ稱為Ruby£¬ÊÇÒò為PerlµÄ發Òô與6ÔµÄ誕Éúʯpearl£¨ÕäÖ飩Ïàͬ£¬Òò´ËRubyÒÔ7ÔµÄ誕Éúʯruby£¨紅寶ʯ£©ÃüÃû¡£
    RubyÃ÷顯±ÈÆäËû類ËƵijÌʽ語ÑÔ£¨ÈçPerl»òPython£©Äê輕£¬ÓÖÒò為RubyÊÇÈÕ±¾ÈË發Ã÷µÄ£¬ËùÒÔÔçÆڵķÇÈÕÎÄ資ÁϺͳÌʽ¶¼±È較貧·¦£¬ËùÒÔ現ÔÚÔÚ網ÉÏÈÔÈ»¿ÉÒÔÕÒµ½RubyµÄ資ÁÏÌ«ÉÙÖ®類µÄÅúŢ ......

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 opt ......

ruby on rails


rubygems
Ruby on Rails ÊÇÒ»¸ö¿ÉÒÔʹÄ㿪·¢£¬²¿Êð£¬Î¬»¤ web Ó¦ÓóÌÐò±äµÃ¼òµ¥µÄ¿ò¼Ü¡£
¡¡¡¡RubyµÄ×÷ÕßÓÚ1993Äê2ÔÂ24ÈÕ¿ªÊ¼±àдRuby£¬Ö±ÖÁ1995Äê12Ô²ÅÕýʽ¹«¿ª·¢²¼ÓÚfj£¨ÐÂÎÅ×飩¡£Ö®ËùÒÔ³ÆΪRuby£¬ÊÇÒòΪPerlµÄ·¢ÒôÓë6Ôµĵ®Éúʯpearl£¨ÕäÖ飩Ïàͬ£¬Òò´ËRubyÒÔ7Ôµĵ®Éúʯruby£¨ºì±¦Ê¯£©ÃüÃû¡£railsÔÚÓ¢ÎÄÖÐÊÇÀ¸¸ËµÄÒâ˼£¬Æä±íÃæÒâ˼ÊÇÔÚÀ¸¸ËÉϵÄRuby¡£
¡¡¡¡µ±È»ÁË£¬ËùÓÐµÄ web ¿ò¼Ü¶¼ÓÐͬÑùµÄÄ¿±ê¡£ÊÇʲôʹµÃ Rails Èç´Ë²»Í¬ÄØ£¿ÎÒÃÇ¿ÉÒÔͨ¹ý¼¸¸ö;¾¶À´»Ø´ðÕâ¸öÎÊÌâ¡£
¡¡¡¡µÚÒ»ÊÇ¿´¼Ü¹¹¡£ÔÚ¹ýÈ¥µÄʱ¼äÀÐí¶à¿ª·¢ÕßÔÚÑϽ÷µÄ web Ó¦ÓóÌÐòÉÏʹÓà MVC ¼Ü¹¹¡£ËûÃÇ·¢ÏÖ MVC ¼Ü¹¹¿ÉÒÔʹËûÃǵijÌÐò±äµÃ¸üÇåÎúÔÚ java ÖÐÏó Tapestry ºÍ Struts ÕâЩ¿ò¼Ü¶¼ÊÇ»ùÓÚ MVC ¡£ Rails Ò²ÊÇÒ»¸ö MVC ¿ò¼Ü¡£µ±ÄãʹÓà Rrails ½øÐпª·¢£¬Ó¦ÓóÌÐòµÄËùÓдúÂëÒÔÒ»ÖÖ±ê×¼·½Ê½»¥Ïà×÷Óá£ÔÚ¿ªÊ¼¿ª·¢Ö®Ç°£¬Õû¸öÓ¦ÓóÌÐòµÄ¹Ç¼ÜÒѾ­´îºÃµÄ¡£
¡¡¡¡»Ø´ðÕâ¸öÎÊÌâµÄµÚ¶þ¸öÊÇ¿´±à³ÌÓïÑÔ¡£ Rails ³ÌÐòÊÇʹÓà Ruby ±àдµÄ£¬ËüÊÇÒ»ÃÅÏÖ´ú£¬ÃæÏò¶ÔÏóµÄ½Å±¾ÓïÑÔ¡£ Ruby ¼ò½à£¬²»ÄÑÀí½â¡£Ëü¿ÉÒÔÈÃÄã¿ìËÙµØÓôúÂë×ÔÈ» , ÇåÎú±í´ïÏë·¨¡£ÈÃÄãµÄ³ÌÐòÄܼܺòµ¥±»±àд²¢ÇÒÔÚ¼¸¸öÔºó»¹ÄܺÜÈÝÒ׶Á¶®¡£
¡¡¡¡Ruby ......

windows ÏÂrubyµÄ°²×°

1£¬°²×°ruby
ÏÂÔصØÖ·£º http://rubyinstaller.org/download.html
2£¬°²×°rails
ʹÓÃÃüÁîÏÂÔØ£ºÔÚÃüÁîÐÐÔËÐÐgem install rails --remote
2£¬³õ²½Á˽ârubyµÄÎÄÕÂ
http://www.bcbbs.net/html/29671.html
http://www.bcbbs.net/dev/List64.aspx ......

RubyÉùÒô


ת Adding Sound to Your Ruby Apps
Have you ever thought about including sounds in your Ruby application? Used sparingly, sound may enhance your applications by adding audio cues or a custom touch. You could, for example, play a beep or chime that announces the completion of a lengthy process. Perhaps a humorous sound to accompany an error message .
The win32-sound library makes using sounds really simple.
If you installed Ruby with the One-Click Ruby Installer, then you probably already have the win32-sound library installed, along with other win32 utilities. Otherwise, you can install it in seconds via gem. Open up a console window and enter..
gem install win32-sound
To use the win32-sound library, add these require and include statements to the top of your script...
require 'win32/sound'
include Win32
Then, to play a sound file on the PC, call the Sound.play method, passing it the name of the file...
Sound.play('chimes.wav')
Sound.play('c:\sounds\hal9000.wav')
In the exa ......

rubyºÃÏñÓÐÖ¸Õë°¡£¡£¡£¡

b = "123"
a = b
b.gsub!(/2/,"")
puts a
µÃµ½µÄ½á¹ûÊÇ13£¬·¢ÏÖÈç¹ûa = bµÄ»°Ã²ËÆÖ»ÊÇ°ÑbµÄÖ¸Õë¸øÁËa£¬µ«ÊÇÈç¹ûbµÄÖµ·¢ÉúÁ˱仯a²ÅÄÜ´ÓbÖжÀÁ¢³öÀ´¡£
Èç¹û°ÑÉÏÃæµÄ´úÂë¸Ä³É
b = "123"
a = "#{b}"
b.gsub!(/2/,"")
puts a
ÔòµÃµ½µÄ½á¹ûΪ123£¬ÕâÀïÊÇ°ÑbµÄÖµ¸øÁËa
²»ÖªµÀÎҵIJÂÏë¶Ô²»¶Ô£¡ ......
×ܼǼÊý:146; ×ÜÒ³Êý:25; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [6] [7] [8] [9] 10 [11] [12] [13] [14] [15]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ