Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
@gihnius
会员
第 6061 位会员 / 2013-03-10

广州
31 篇帖子 / 335 条回帖
5 关注者
0 正在关注
52 收藏
GitHub Public Repos
  • jquery.qeditor 35

    This is a simple WYSIWYG editor with jQuery.

  • http-pinger 20

    A simple tool to check website status and notify via email.

  • cl-common-blog 18

    a blog engine written in common lisp

  • gomemoize 11

    memoization function in Go

  • hunchentoot-secure-cookie 9

    encodes and decodes authenticated and optionally encrypted cookie values.

  • freebsd-wifi 7

  • ht-routes 7

    route mapping and dispatching URL's for Hunchentoot in Common Lisp.

  • gosanitize 6

    Gosanitize is a whitelist-based HTML sanitizer in Go language. Given a list of acceptable element...

  • rdb-backup 5

    redis rdb backup

  • redis_online_counter 5

    Counting online users with Redis and Go.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 要把社区的 topics 和 replies 为用户做成 timeline, 怎样做? at 2013年09月02日

    #1 楼 @kingwkb 不一样,我要的是每个用户自己的所有帖子和回复

  • 昨天有面试的算法题目,当抛砖引玉了 at 2013年08月01日

    #32 楼 @bhuztez prolog 看上去的确很牛啊,这几天开始看 prolog 了。ruby 真不方便干这些事,这是我的 ruby 方案,有点费劲:

    def make_changes(need, coins, feed = {})
      valid_coins  = coins.keys.select{|c| c <= need && coins[c] > 0 }.sort.reverse
      valid_coins.each do |c|
        feed[c] ||= 0
        feed[c] += 1
        return feed if c == need
        coins[c] -= 1
        f = make_changes( need - c, coins, feed)
        return f if f
      end
    end
    
    #> make_changes 160, { 1 => 4, 5 => 1, 10 => 1, 50 => 1, 100 => 1}
    => {100=>1, 50=>1, 10=>1}
    
    #> make_changes 160, { 1 => 4,5 => 2, 10 => 0, 50 => 1, 100 => 1}
    => {100=>1, 50=>1, 5=>2}
    
  • 姨妈贴 RVM rbenv 讨论 at 2013年08月01日

    简单的问题被 rvm rbenv 弄得恶心至极,不就切换一下环境变量的事!

  • 昨天有面试的算法题目,当抛砖引玉了 at 2013年07月28日

    #11 楼 @luikore 记得找零算法有个高难度的版本,就是限制各种面值的货币数目的情况,比如找 $160,但是货币只有这些:$100 => 1, $50 => 1, $20 => 3, $5 => 1。有没有好的方法?

  • Hadoop 这个还真大 at 2013年07月17日

    这块真的很恶心!幸好还有 EC2 EMR。

  • 这是怎么回事? at 2013年06月16日

    这确实是 ruby 变态的地方:

    class A
      def val=(v)
      end
    
      def val
      end
    end
    
    a = A.new 
    a.val = 100
    # => 100
    a.val 
    # => nil
    

    更变态的来了:

    class A
      def val=(v)
        @member = v.upcase
      end
    
      def val
        @member
      end 
    end
    
    a = A.new
    a.val = 'hello'
    # => 'hello'
    a.val
    # => 'HELLO'
    

    这个跟平常思维不一致!
    你们可能会说,val 只是个方法,方法可以返回任何东西。 但我还是觉得这跟玩似的!

  • 折腾 Twitter 1.1 Api 真的很蛋疼,有木有? at 2013年06月09日

    #1 楼 @search 那个真没兴趣

  • 最近写了一个 Mac 上的屏幕保护程序,大家检验下~ Retina 没试过 at 2013年06月04日

    retina 看了下也不错。

  • 想在武汉招满 14 个搞 ror 的,是不是 mission impossible? at 2013年06月04日

    现在流行 remote ?

  • 有用过 S3 的近来聊聊哈 at 2013年06月02日

    只是用来备份数据,稳定。速度在国内肯定不行。

  • 关于《代码未来》一点感想 at 2013年05月31日

    像 lisp 这样的语言活几百年不奇怪呀。 王垠 blog 写的 最牛比的 chez scheme, 貌似被 Cisco 收购了,你觉得思科拿 scheme 来干吗?(chez scheme 官网说已是 cisco xx 的一部分) 为什么好的 lisp 编译器都价格昂贵?

  • ruby 读取配置文件 (更新方法) at 2013年05月28日

    settingslogic gem ?

  • 想学习一下涵式编程 Lisp 和 Haskell 选择哪个更适合一些? at 2013年05月27日

    common lisp

  • e17 桌面很好用啊 at 2013年05月25日

    e17 有好多个进程呢,你看哪个只占 70M ?

  • 求 Mac 的 Emacs 配置,,, at 2013年05月17日

    怎么会有报错?你的版本不同 linux 的吧,试试这个:https://github.com/railwaycat/emacs-mac-port

    这是我的 emacs:

    没有什么特别配置,就改下颜色,用 elpa 管理扩展。

  • rails 或 ruby 可以加密或者其他方式保护源码吗? at 2013年05月08日

    爱折腾就把你的应用的核心部分用 C/C++ 写成动态库通过 gem 加载。😄

  • 类似帐号中心的实现方案 at 2013年04月27日

    类似 LDAP ?

  • 一道 Ruby 水平自测题. at 2013年04月24日

    #44 楼 @baxiaopeng 你可以这么理解:&object 其实就是从 object 返回 Proc 的语法糖。

  • 王垠谈编辑器与 IDE at 2013年04月22日

    #44 楼 @Rei 你列出那行(cps '(lambda (x) (if (if x (zero? a) b) c d)))是测试用例,不拿这个说事,他牛的是指上面那 40 行。

  • rbenv vs rvm, 你们选择用哪个? at 2013年04月17日

    rvm 过度设计。 rbenv 刚好,配合 bundler. gem install 默认可以安装多个不同版本,加上 rbenv 切换 ruby 版本刚好。 讨厌 gemset 这样的概念和设计。

  • 一道 Ruby 水平自测题. at 2013年04月15日

    很少人会关注 new x,y 会返回什么吧? 这个测试让人蛋疼。 我觉得关键还是 &Array 相当于

    if Array.is_a?(Proc)
      Array
    else
      Array.to_proc
    end
    
    map { |x| Array.to_proc.call x }
    
  • 上一页
  • 1
  • 2
  • …
  • 9
  • 10
  • 11
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English