Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Hooopo
@hooopo
管理员
第 8 位会员 / 2011-10-28

[email protected]
nil
北京
160 篇帖子 / 3013 条回帖
360 关注者
0 正在关注
74 收藏
聪明的妖怪录下了唐僧的紧箍咒
打赏作者
GitHub Public Repos
  • oh-my-github-circles 47

    GitHub User Circle Generator Using GitHub Actions

  • hackernews-insight 21

    Hackernews Insight using TiDB Cloud

  • repo-track-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your da...

  • oh-my-github-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your d...

  • chatgpt-xiaoai 3

    小爱音箱集成LLM,SaaS 服务

  • repo-contributor-circles 1

    GitHub repo contributor circles generator.

  • ossinsight-x 1

    Automatically post trending repos to Twitter every day.

  • mi-service 1

    XiaoMi Cloud Service for mi.com

  • hooopo 0

  • streamlit-echarts-demo 0

    Demo for Streamlit ECharts component

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 为什么要嵌套 Cache at 2012年10月22日

    因为大粒度的 cache 提升的性能多,但是容易失效。小粒度的 cache 灵活,不容易失效,效果不显著。

    这样嵌套是可以获得两者的优点,就是苦了 memcache,但是 memcache 就是来干这个的啊。。浪费就浪费吧

  • 大家看看这个代码能改进不 at 2012年10月21日

    #22 楼 @luikore 完全赞同啊。。 不过你这么写又成了“Ruby 黑魔多”的证据,然后你就成了外国人, 最后把你挂到Rubydramas上面..

  • 发现我上豆瓣,上一次我骂一次 at 2012年10月21日

    #2 楼 @tonyseek 你是来卧底的哇..

  • 大家看看这个代码能改进不 at 2012年10月19日

    #14 楼 @fsword 不能这么说。。和 sort&sort_by 一样,影响因素比较多。像你这种简单的比较还是 max 快..

    max: https://gist.github.com/3916880 sort: https://gist.github.com/3916850

  • 大家看看这个代码能改进不 at 2012年10月19日

    #10 楼 @fsword 那就先 group by 一下啊

    还有比较数组用 max 一定没有 max by 性能好

  • 大家看看这个代码能改进不 at 2012年10月19日
    Dir['**/*.txt'].map{|file| File.read(file) =~ /max:(.+) min:(.+)/;[$1.to_i - $2.to_i, file]}.max_by{|x| x[0]}.to_s
    
  • DRY Your Ruby Constants Configs and Routes In Javascript at 2012年10月19日

    #5 楼 @huacnlee yeah! so quick, so dirty...

  • 会 Rails 的人玩 Mobile 的话选 Android 多还是 iPhone 多 at 2012年10月18日

    #18 楼 @ery QQ 数据在本地?迅雷数据在本地?360 的数据在本地?

  • 通知功能加入了实时提醒功能 at 2012年10月18日

    开两个 tab 就会在右下角弹出两个提醒啊 这不科学!

  • 会 Rails 的人玩 Mobile 的话选 Android 多还是 iPhone 多 at 2012年10月18日

    弱弱的问一下,移动应用的未来和现在的 windows 桌面应用会有多大的区别? 各种应用装在你机器上你放心么,动不动就让你更新你不烦么? 好吧,我是想说浏览器还是未来...

  • [成都] Ruby on Rails 招聘实习生 at 2012年10月18日

    公司名字不错!

  • ActiveRecord 多次 include 同一个表的排序 at 2012年10月18日

    这样也可以吧? Policy.includes(:company_a => [:company_b, :company_c]).order("companies.name")

  • 关于对 mongoid 关系不解 at 2012年10月17日

    #4 楼 @sanivbyfish 答的是 1L 的问题

  • 关于对 mongoid 关系不解 at 2012年10月17日

    #1 楼 @cxh116 http://ruby-china.org/topics/5375 @huacnlee 侧栏的相关话题为什么去掉了 已经在两个帖子里手动推荐相关话题了。。http://ruby-china.org/topics/5528

  • 关于 has_many through 关联的查询排序 at 2012年10月16日

    Appointment.where(:patient_id => 2).joins(:physician).order("physicians.name DESC")

  • 分享 编程的名言佳句 at 2012年10月16日

    it works on my machine!

  • 看上去 GemBundler 并没有解决版本冲突的问题啊 at 2012年10月15日

    可以贴一下 Gemfile.lock 么

  • 为什么这里有 sql 注入的漏洞呢? at 2012年10月15日

    Possible SQL injection的意思是潜在的 SQL 注入漏洞,提示你注意一点儿,像这种机器分析程序很难智能到根据实际情况去判断是否有漏洞。。

  • redis 的持久化 at 2012年10月14日

    Redis:“我真没用,竟然让你问出这样的问题.......”

  • Is In-logic assignment Bad? at 2012年10月13日

    发现 coffescript 编译出来的 js 也是这样的风格:

    fetchHistory = function(state) {
      var page;
      cacheCurrentPage();
      if (page = pageCache[state.position]) {
        changePage(page.title, page.body);
        recallScrollPosition(page);
        return triggerEvent('page:restore');
      } else {
        return fetchReplacement(document.location.href);
      }
    };
    

    但是由于 js 奇怪的作用域问题,在赋值之前要进行声明var page;写起来就比较罗嗦。 注:不能用if (var page = pageCache[state.position]),因为var xx = xxx永远返回undefined;

  • 无聊,来扯扯淡吧,大家周末都怎么过的? at 2012年10月13日

    吃饭 睡觉 打 bug

  • 名字,很重要 at 2012年10月12日

    还有 first last 什么的

  • unicorn 略蛋疼 at 2012年10月11日

    #3 楼 @aligo 这没什么吧 Nokogiri 还不提供 gemspec 呢!不同软件有不同的构建发布方式..

    http://blog.flavorjon.es/2012/03/y-u-no-gemspec.html

  • ruby 的一个小的发现,不知道你发现没有. at 2012年10月11日

    ...

  • LinkedIn Moved From Rails To Node: 27 Servers Cut And Up To 20x Faster at 2012年10月09日

    Awesome!

  • 女程序员 Github 求偶? at 2012年10月09日

    #14 楼 @chairy11 不会日语居然翻译完了。。够无聊:-)

  • ruby 中"变量的变量"如何表示 at 2012年10月09日

    #3 楼 @cxh116 第一种情况也一样啊

    @a = 1
    instance_variable_get(:@a)
    
  • Ruby 的语法糖 * 号你还知多少 at 2012年10月09日
    1. 和*args是一样的,只是因为不需要使用 args 就省略了
    2. supper和supper()是有区别的,但是这个特性和*是没关系的,你被supper误导了。
  • 灰头土脸 at 2012年10月06日

    #2 楼 @Saito 目前敲代码的速度不会成为开发的瓶颈。主要时间还是在思考如何设计和调试上面(最耗时的其实是走神儿,刷几个网页一上午就过去了……)

  • require rubygems 问题 at 2012年10月05日

    Ruby1.9 默认就引入了 rubygems

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