Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Liang
@zhlwish
高级会员
第 2739 位会员 / 2012-07-03

[email protected]
amazon.cn
北京
7 篇帖子 / 39 条回帖
1 关注者
0 正在关注
1 收藏
关注程序,更关注秩序;思考算法、更思考活法
GitHub Public Repos
More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • yield 肿么翻译 at 2014年01月23日

    yield

  • 写出好的 commit message at 2013年11月26日

    原来这是样写的,拜读!

  • bundler 1.4.0 增加并行支持,以后不能偷懒了... at 2013年09月02日

    相当不错!

  • 如何理解 singleton class at 2013年08月13日

    这两个解释的很好了:

    http://stackoverflow.com/questions/212407/what-exactly-is-the-singleton-class-in-ruby http://www.devalot.com/articles/2008/09/ruby-singleton

  • 怎么传入一个函数和它的参数 at 2013年08月13日

    呵呵,不知道你是不是想这样:

    def linkhandle(urls,prefix)
      urls.map { |url| "#{prefix}#{url}" }
    end
    
    def process(handle,prefix="https://")
      urls=['./201207/t20120705_1887040.html', './201206/t20120608_1846662.html']
      send handle, urls, prefix
    end 
    
    list= process(:linkhandle,'http://www.baidu.com')
    print list.join("\n")
    
  • 周二去北京,有收沙发客的吗? at 2013年08月12日

    诶,这倒是个好想法啊

  • Ruby Hacking Guide at 2013年08月12日

    有日语版的,可惜完全不懂日语!

  • Ruby 冲击波,谁还可以做个更牛的出来 at 2013年05月05日

    哈哈,挺漂亮的!

  • 你们公司招聘毕业生都考很多算法么? at 2013年03月26日

    #8 楼 @kgen 嗯,尝试这种方法中...

  • 你们公司招聘毕业生都考很多算法么? at 2013年03月25日

    #1 楼 @tumayun 实际上我自己工作中都没怎么遇到算法,反而是模块话、测试这些在实践中积累起来的经验比较重要

  • 什么叫企业级? at 2013年03月25日

    赞楼上

  • Rails Assets Pipeline 的价值 at 2013年03月25日

    我感觉 asset pipeline 让 javascript mvc 的框架很难集成到 rails 中,不知道这个问题各路大神和怎么解决的

  • writings.io - 提供在线文章写作、管理、发布的网站服务 at 2013年03月12日

    非常棒!

  • 老大们决定用 JRuby on Rails,看看这个版块的冷清,就知道... at 2013年01月29日

    一个月后再回来,JRuby 本身如何还无法判断,但是和公司原有的开发和部署环境集成太痛苦了,包的版本,用公司的一些包的问题,关键是还得在 Ruby 中调用 Java 代码,实在是相当难看!

  • 老大们决定用 JRuby on Rails,看看这个版块的冷清,就知道... at 2012年12月20日

    嗯,这么多人回复,让我顿时回复了信心!

  • Rails Asset Pipeline 的理解和一个小 Tip at 2012年12月20日

    但是有个例外,在上面的例子中,require_tree 不会到逻辑目录里去找,而是只到'app/assets/javascripts'里去找。所以即使你用了 requre_tree ., 你还是需要手动将 lib 和 vendor 里需要的 js 文件包含进来

    这个害我弄了半天,感谢楼主!

  • [求助] 社区的编辑器是怎么实现的? at 2012年11月02日

    找到了点资料:http://ruby-china.org/topics/6324

  • Linux 在线学习及问答网站上线,仿 Codecademy 和 Teamtreehouse 风格,大家拍砖~~ at 2012年11月02日

    非常棒非常棒!

  • ActiveRecord 和 ActiveModel 的区别与联系 at 2012年10月17日

    #3 楼 @huacnlee 有什么其他的三方 gem?

  • 番茄土豆:小小生产力工具 at 2012年09月23日

    非常棒非常棒!!

  • Rails 技巧之 tap & try at 2012年09月10日

    这个方法好,之前我都是用 alias_method 实现的让 list 字段不为 nil

    def do_validate(name) ret = send("#{name}_without_validate".to_sym)

    if ret.nil? logger.debug(“#{name} is nil”) ret = [] end

    ret end

    def self.validate(method) method_without = "#{method}_without_validate".to_sym method_with = "#{method}_with_validate".to_sym

    define_method(method_with) do |*args, &block| do_validate(method) end

    alias_method method_without, method alias_method method, method_with end

  • [Rails API] ApplicationController#default_url_options () at 2012年09月09日

    #2 楼 @loushizan 呵呵,对头!

  • Ruby's GC Innovator - 一篇对 Ruby GC 开发者的采访 at 2012年08月13日

    #1 楼 @ywjno 楼上神人!

  • 诡异的 Ruby 语法行为 at 2012年08月13日

    果然,在没定义 m 的时候执行m = 'test' if !defined? m之后,m 成了nil

  • 一点点心得: Rack 在 Rails 中的使用 at 2012年08月13日

    #6 楼 @wyh770604 以前没听说过 sinatra,感谢推荐,找了点资料,http://www.iteye.com/topic/632708 http://rubysource.com/rails-or-sinatra-the-best-of-both-worlds/

  • 有没有简单的方式给 lazyload 出来的元素绑定上 js 的事件? at 2012年08月09日

    @chucai 嗯,live()

  • Ruby 不讲究切面编程吗? at 2012年08月09日

    把那本 meta programming ruby 好好看看,基本就明白了,AOP 已经在 ruby 骨子里面了...

  • [北京][2012年08月11日] Ruby 活动公告 + 媒体资料 + 小结 at 2012年08月08日

    @zhlwish 报名,向大家学习

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