Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
loveky
@loveky
高级会员
第 1333 位会员 / 2012-03-08

JD
北京
19 篇帖子 / 435 条回帖
2 关注者
0 正在关注
46 收藏
我不生产代码,我只是Github和StackOverFlow的搬运工
GitHub Public Repos
  • flutter_listview_child... 13

    Flutter ListView child visibility change monitor / Flutter ListView 组件子元素曝光统计

  • effective-typescript-note 5

    📒《Effective TypeScript》读书笔记

  • unit-testing-react-com... 2

    Demo code for

  • baidu_movie 1

    loveky的电影院

  • magic_control 1

    Control your PC with your SmartPhone

  • test-rematch-loading-ts 0

  • daily-report 0

    研发一组 日报系统

  • react-amap-loveky 0

  • rematch 0

    A Redux Framework

  • rust-lang-book 0

    The Rust Programming Language

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [上海][2013年9月10日] Ruby Tuesday 活动召集 (周二) at 2013年09月02日

    👍

  • 你们家里用的电脑座椅都什么价位 at 2013年09月02日

    #11 楼 @jjym 买了个站立电脑桌,尝试了几天,太累。。。

  • 你们家里用的电脑座椅都什么价位 at 2013年09月01日

    电脑椅普遍都贵吧,200 应该是比较便宜的了

  • 如何管理 Github 的私有库? at 2013年09月01日

    #19 楼 @diguage 那就给你原来的几个小伙伴加到 Org 下的 team 里,然后给 team 配置相应的 access,让你的小伙伴再来 fork 一次。

    原来的 fork 现在不能用我想是基于这样的原因: 以前你的 repo 是公开的,所有人都可以 fork,然后所有人 fork 出去的也都是公开的,没有任何问题 现在你把你自己的 repo 设置成私有的(非公开的)但是原来的 fork repo 还是公开的,如果这时候他们还能给你提交代码,那么不就相当于变相的把你私有 repo 里的东西暴露出来了?那你搞个私有 repo 还有什么意义。。。所以强制你的小伙伴们重新 fork

  • 如何管理 Github 的私有库? at 2013年09月01日

    #12 楼 @diguage 从名字上就能看出来啊,公开的所有人都能看到你的代码,私有的只有你自己能看到,除非你明确授权给其他人

  • 如何管理 Github 的私有库? at 2013年09月01日

    #13 楼 @nightire 你这个说的是 organization 里的 team 吧,

  • RubyConfChina 2013 开始接受报名和售票! at 2013年08月29日

    一票在手,天下我有

  • 如何将 Slim 文件转换回 erb at 2013年08月28日

    类似的有没有 HAML 转 erb 的?

  • 怎么批量生产测试数据 at 2013年08月27日

    FactoryGirl 或 Fabricate

  • 如何用 ruby 实现根据网页中的地址生成一个百度地图 at 2013年08月26日

    #7 楼 @datty258 http://developer.baidu.com/map/jsdemo.htm#i7_1 百度文档里有很详细的示例啊

  • 如何用 ruby 实现根据网页中的地址生成一个百度地图 at 2013年08月26日

    LZ 是想给一个地址的字符串,通过百度 API 生成地图?

  • button_to 问题 at 2013年08月22日

    #2 楼 @jiwoorico 看源码 https://github.com/rails/rails/blob/797fcdf738a2a2772544731027d4fc5ca9d358bc/actionpack/lib/action_view/helpers/url_helper.rb#L280

    这行

    url    = options.is_a?(String) ? options : url_for(options)
    

    第 2 个参数如果是字符串,则把它当做 form 的 action URL,否则把他当参数传给 url_for

  • [北京] 生物公司需求内部网站 / 后台程序员 ruby at 2013年08月21日

    对公司当前已运行系统的熟悉与维护,当前公司主要信息流系统为 OA、Lims、引物合成、基因检测、库存管理、固定资产管理。

    啥都要干。。

  • [9.16 更新两位讲师] RubyConf China 2013 讲师介绍 at 2013年08月20日

    拜神

  • [上海][2013年8月20日] Ruby Tuesday 活动召集 (周二) at 2013年08月20日

    #22 楼 @everett 2 号口出来,走环岛的天桥

  • [上海][2013年8月20日] Ruby Tuesday 活动召集 (周二) at 2013年08月20日

    #19 楼 @Vincent178 到了

  • 安装 ruby 第一步就出问题。。。 at 2013年08月20日

    提示信息里写的很清楚了

    If you'd like to turn off curl's verification of the certificate, use
    the -k (or --insecure) option.
    

    加上-k参数

    curl -k -L https://get.rvm.io | bash -s stable --ruby
    
  • [上海][2013年8月10日] Ruby Tuesday 活动召集 (周六) at 2013年08月10日

    地方有点小啊

  • 看了大家的讨论觉得很有帮助,于是又来贴题目 at 2013年08月09日

    不考虑复杂情况 (仅按空白字符作为分割单词的依据),把基于正则的scan换成简单的split,会快一些。。。。

    => cat /tmp/ruby_test1.rb 
    1000000.times do
      'olly olly in come free'.downcase.scan(/[a-zA-Z0-9]+/).group_by{ |elem| elem }
    end
    => cat /tmp/ruby_test2.rb 
    1000000.times do
      'olly olly in come free'.downcase.split.group_by{ |elem| elem }
    end
    => time ruby /tmp/ruby_test1.rb 
    
    real    0m6.860s
    user    0m6.823s
    sys 0m0.035s
    => time ruby /tmp/ruby_test2.rb 
    
    real    0m3.678s
    user    0m3.669s
    sys 0m0.007s
    

    当然,这点差距可以忽略不计。。。

  • [上海][2013年8月10日] Ruby Tuesday 活动召集 (周六) at 2013年08月09日

    #60 楼 @knwang awesome!

  • 在 redhat 下安装 emacs 时,./configure 报错了,不知道该如何解决,麻烦高手指点一下 at 2013年08月09日

    google yum, 不过要使用 CentOS 的源 or If you are sure you want Emacs compiled without X window support, pass --without-x

  • 一小段代码重构 at 2013年08月09日

    #10 楼 @blacktulip 恩,这个不是必须的,只是读起来比较舒服,WordParser 是个解析器,他应该parse(解析)输入内容,这样比 new 读起来语义上更通顺吧

  • 一小段代码重构 at 2013年08月08日
    class WordsParser
    
      def self.parse(words)
        return new(words)
      end
    
      def initialize(words)
        @words = words
      end
    
      def silent?
        @words.nil? || @words.strip.empty?
      end
    
      def shout?
        @words.upcase == @words
      end
    
      def question?
        @words.end_with?("?")
      end
    end
    
    class Bob
      def hey(words)
        @parser = WordsParser.parse(words)
    
        if @parser.silent?
          "Fine. Be that way!"
        elsif @parser.shout?
          "Woah, chill out!"
        elsif @parser.question?
          "Sure."
        else
          "Whatever."
        end
      end
    end
    
  • [上海][2013年8月10日] Ruby Tuesday 活动召集 (周六) at 2013年08月08日

    #50 楼 @gene_wu 为毛没有@我。。。。

  • jQuery 绑定对象在 Ajax 之后不能更新怎么办? at 2013年08月08日

    #1 楼 @miclle 为什么呢?on 的出现不是为了统一事件绑定的 API 么,以前有 live,delegate,bind,现在用 on 就行了

  • @tmm1 教你 Eventmachine at 2013年08月08日

    LZ 的分享都是高质量的啊

  • RubyConfChina 2013 会场地点确定! at 2013年08月07日

    #117 楼 @hpyhacking 这些可以有

  • [上海][2013年8月10日] Ruby Tuesday 活动召集 (周六) at 2013年08月07日

    @xmonkeycn

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