Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@blacktulip
高级会员
第 207 位会员 / 2011-11-23

117 篇帖子 / 2599 条回帖
40 关注者
0 正在关注
4 收藏
GitHub Public Repos
  • octopress-theme-yinyang 37

    YinYang (陰陽) is a minimal, responsive theme for Octopress.

  • vimfiles 1

    My vimfiles

  • project_euler_in_ruby 1

  • hanzi-writer 0

    Chinese character stroke order animations and practice quizzes

  • docrails 0

    Rails branch for quick doc fixes, please DO NOT OPEN PULL REQUESTS IN HERE

  • qingwang.github.com 0

  • www.ruby-lang.org 0

    Source of the www.ruby-lang.org site

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 恶补 ruby 基础之----include 和 extend 模块疑问求解 at 2012年10月26日

    楼主,你这样子贴图实在没法看啊,贴到 pastebin 或者 gist 吧 -_-||

  • 饿补 Ruby 基础之 --- 类之间的继承关系模糊了 at 2012年10月26日

    Class 的父类是 Module (001); Module 的父类是 Object (003);Object 的父类是 BasicObject (005);BasicObject 没有父类 (007)。 Module 是一个类 (002);Object 是一个类 (004);BasicObject 是一个类 (006)。

  • 一个新手小问题 at 2012年10月26日

    楼主直接用 Integer(@price*100 + 0.5) 也是可以的,只是用 attr_accessor 去读的话以后加这加那的比较 flexible 一点

  • 一个新手小问题 at 2012年10月26日

    #1 楼 @chenge 楼主问的不是这个 @zsxywz0928 我的理解,attr_accessor :price 实际上是写了一个名叫 price 的 method,这个 method 功能就是给给@price这个变量读写 (写的方法名是 price=好像),在 Integer(price*100 + 0.5) 里面这个 price 实际上是在 call 这个 method,返回的是@price的值

  • Ruby 的语法糖 * 号你还知多少 at 2012年10月23日

    应该就是这个意思,自己不用,给上面用

    Folks sometimes use a splat to specify arguments that are not used by the method (but that are perhaps used by the corresponding method in a superclass. (Note that in this example we call super with no parameters. This is a special case that means “invoke this method in the superclass, passing it all the parameters that were given to the original method.”)

    class Child < Parent def do_something(*not_used) # our processing super end end

    In this case, you can also leave off the name of the parameter and just write an asterisk:

    class Child < Parent def do_something(*) # our processing super end end

    • Programming Ruby 1.9 The Pragmatic Programmers' Guide Page 139
  • 有没有监视一个网页,有变化的时候邮件通知我的服务 at 2012年10月23日

    http://www.changedetection.com 类似这样的么?

  • 鼠须管输入法,确实快得不像话啊! at 2012年10月23日

    #5 楼 @pzgz 学习......

  • 鼠须管输入法,确实快得不像话啊! at 2012年10月23日

    鼠须管直接装上用是很快,然后导入了全套搜狗词库,速度也就慢下来跟其它输入法一样了

  • Happycasts: 用 tmux 畅游命令行 at 2012年10月22日

    感谢楼主,以前只把它当 screen 在用,原来能玩出这么多花样来。

  • 终于体会到 rails 的魔力了 at 2012年10月22日

    鼓掌!

  • 征询 RubyConfChina 大会的视频录制方案 at 2012年10月20日

    又不是演唱会,足球赛,直播毫无意义,纯增加成本,把录播的质量搞高一点是正经事,钱要花在刀刃上。我的经验:麦克风一定要保持在讲员的嘴附近,别衣领上那种就很好,千万不能用摄像机机身上的麦克风录制的声音当音源,那个离得太远,放出来全是杂音。另外每段视频最好能把对应的 slide 文件给附上,这样如果视频看不清楚,可以直接打开 slide 文件来对照。只要做到这两点,能听清讲员声音,能看清 slide 了,其它的问题都不大。

  • 使用 Mechanize 抓网页,出现 encoding error 问题 at 2012年10月19日

    原来可以这样选 encoding。是的,加上 page.encoding 之后就正常不报错了

  • 使用 Mechanize 抓网页,出现 encoding error 问题 at 2012年10月19日

    完全按楼主的代码运行后出现两条错误信息

    > ruby test_mechanize_encoding.rb > test_mechanize_encoding.txt
    encoding error : input conversion failed due to input error, bytes 0x46 0xBB 0xF9 0xD6
    encoding error : input conversion failed due to input error, bytes 0x51 0x3A 0xD7 0xF6
    

    但是链接倒是全扒下来了,最后几个是

    
    About Sina
    广告服务
    联系我们
    招聘信息
    网站律师
    SINA English
    会员注册
    产品答疑
    版权所有
    
  • Ruby On Rails 学习视频链接分享 at 2012年10月19日

    #1 楼 @logoove 不过关就学到过关咯

  • 你花多长时间打磨你的技术,你可能就需要花多长时间学习创业 at 2012年10月18日

    这意思是说,技术越烂的人,学习创业需要的时间越短么?

  • 才发现 rails2 和 rails3 之间的区别还不小哦~~ at 2012年10月18日

    #3 楼 @small_fish__ (3-2)/2 = 50% 嘛

  • 求助: Mechanize 的 form 里面怎么样用 variable 去表示一个 field name ... 表达得不是很清楚,具体见帖子内容 at 2012年10月18日

    #3 楼 @huacnlee 谢谢,成功了,写成这个样子。 f.send(auth_info[:username_field_name] + '=', auth_info[:username]) f.send(auth_info[:password_field_name] + '=', auth_info[:password])

  • 求助: Mechanize 的 form 里面怎么样用 variable 去表示一个 field name ... 表达得不是很清楚,具体见帖子内容 at 2012年10月18日

    #1 楼 @huacnlee 对啊,都有 name 属性,但是各种各样的网站的登录表单里面的 name 属性的值不同。 如果代码里面写死了 f.log = 'xxx', f.pwd = 'yyy' 这样的话,遇到 name 属性值是 username 和 password 这样的表单不就不适用了嘛,所以我想不写死,写成类似 f.一个变量 这种形式。

  • 才发现 rails2 和 rails3 之间的区别还不小哦~~ at 2012年10月16日

    差了 50% 哩

  • 上一页
  • 1
  • 2
  • …
  • 98
  • 99
  • 100
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English