浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年1月14日

摘要: regexp = /a/result = subject.scan(regexp)ruby-1.9.2-p0 result = subject.scan(regexp)NameError: undefined local variable or method `subject' for main:Object from (irb):8 from /home/mlzboy/.rvm/rubies... 阅读全文
posted @ 2011-01-14 22:17 lexus 阅读(712) 评论(0) 推荐(0)

摘要: http://www.cnblogs.com/cnblogsfans/archive/2009/09/19/1569918.html http://www.cnblogs.com/cnblogsfans/archive/2009/09/17/1568804.html 二、读取文件 view source print? 1file=File.open(File.join("C:","Test.txt... 阅读全文
posted @ 2011-01-14 12:58 lexus 阅读(639) 评论(0) 推荐(0)

摘要: 2010年12月09日 星期四 下午 12:44#foo.rb:p‍uts "中文abc123".to_utf8c:foo.rb a.txta.txt编码为Unicode(UTF-8 without signature) - Codepage 阅读全文
posted @ 2011-01-14 12:51 lexus 阅读(212) 评论(0) 推荐(0)

摘要: 我們以class object這個乍看奇怪的語法用來取得object的eigenclass範圍:o1 = Object.newclass o1def say puts 'yo'endendo1.say= yoo2 = Object.newo2.say= NoMethodError ... 阅读全文
posted @ 2011-01-14 12:01 lexus 阅读(204) 评论(0) 推荐(0)

摘要: ruby way之Enumerables2010年10月15日 下午 01:50Enumerable 模块是一个很重要的模块,ruby中的很多类都有mix这个模块,比如array,hash等等。因此如果你想要自己定义一个collection,则不要继承一个存在的collection,而是应该mix Enumerable 模块。数组是最常用,最有代表性的mix Enumerable模块的一个集合。因... 阅读全文
posted @ 2011-01-14 11:29 lexus 阅读(374) 评论(0) 推荐(0)

摘要: if __FILE__ == $0$:.unshift File.join(File.dirname(__FILE__), '..')require 'eventmachine'# TODO: real tests# TODO: pass in one object instead of two? .each{ |iter| puts iter.current; iter.next }# TODO... 阅读全文
posted @ 2011-01-14 11:24 lexus 阅读(318) 评论(0) 推荐(0)

摘要: http://rubylearning.com/blog/2010/10/01/an-introduction-to-eventmachine-and-how-to-avoid-callback-spaghetti/http://20bits.com/articles/an-eventmachine-tutorial/ 阅读全文
posted @ 2011-01-14 11:17 lexus 阅读(168) 评论(0) 推荐(0)

摘要: timeout.rb Path:timeout.rb Last update:Tue May 25 13:04:11 -0700 2010 Ruby version:Ruby 1.9.2 timeout.rb execution timeout SynopsisDescriptionA way of performing a potentially long-running operation ... 阅读全文
posted @ 2011-01-14 09:51 lexus 阅读(355) 评论(0) 推荐(0)

摘要: http://simohayha.javaeye.com/blog/157709 http://my4java.itpub.net/post/9983/55407 阅读全文
posted @ 2011-01-14 09:44 lexus 阅读(147) 评论(0) 推荐(0)

摘要: http://www.infoq.com/cn/articles/eval-options-in-ruby 阅读全文
posted @ 2011-01-14 09:42 lexus 阅读(166) 评论(0) 推荐(0)

摘要: http://www.cxyclub.cn/n/5652/ Ruby | Block和迭代器 2007-04-16 15:40:43 标签:Ruby ROR Rails 敏捷开发 yield 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://blackanger.blog.51cto.com/140924/23876 Bloc... 阅读全文
posted @ 2011-01-14 09:38 lexus 阅读(385) 评论(0) 推荐(0)

摘要: 分享到... 复制网址邮件QQ空间新浪微博MSN腾讯微博人人网开心网百度搜藏谷歌Buzz搜狐微博腾讯朋友淘江湖网易微博豆瓣查看更多(96) 这是什么工具? JiaThis 分享到各大网站 复制网址收藏夹邮件谷歌BuzzQQ空间百度搜藏新浪微博搜狐微博网易微博腾讯微博人人网开心网搜狐白社会淘江湖百度空间腾讯朋友天涯社区凤凰微博饭否手机优士网GMAIL邮箱Hotmail邮箱Yahoo! ma... 阅读全文
posted @ 2011-01-14 09:36 lexus 阅读(266) 评论(0) 推荐(0)

摘要: https://github.com/archiloque/rest-client http://stackoverflow.com/questions/184178/ruby-how-to-post-a-file-via-http-as-multipart-form-data fiber介绍 http://andyhu1007.javaeye.com/blog/634916 proc类 em-... 阅读全文
posted @ 2011-01-14 01:47 lexus 阅读(1558) 评论(0) 推荐(0)

摘要: http://ruby-doc.org/docs/ProgrammingRuby/html/tut_containers.html C:\Users\Administratorirbirb(main):001:0 def a(name)irb(main):002:1 yieldirb(main):003:1 puts "hello"irb(main):004:1 yieldirb(mai... 阅读全文
posted @ 2011-01-14 00:21 lexus 阅读(447) 评论(0) 推荐(0)