Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
david
@davidqhr
高级会员
第 654 位会员 / 2012-01-02

[email protected]
DDEX
北京
10 篇帖子 / 157 条回帖
5 关注者
0 正在关注
0 收藏
博观而约取,厚积而博发
GitHub Public Repos
  • elixir-captcha 35

    This is a Elixir lib for generating captcha. It drawing captcha image with C code. No dependencies.

  • immutable 1

    Immutable collections for Go

  • go-openai 0

    OpenAI ChatGPT, GPT-3, GPT-4, DALL·E, Whisper API wrapper for Go

  • color-thief 0

    Grab the color palette from an image using just Javascript. Works in the browser and in Node.

  • mixpanel-tracking-proxy 0

    One-click configuration to proxy tracking requests to Mixpanel's API

  • grpc-mtls-example 0

    grpc mTLS example

  • spree-api-v2-js-sdk 0

    Spree Storefront API JavaScript / TypeScript SDK

  • grpc-multi-resolver 0

    Multiresolver allows you to Dial to multiple hosts/IPs as a single ClientConn.

  • go-ethereum-hdwallet 0

    Ethereum HD Wallet derivations in Go (golang)

  • isomorphic-git 0

    A pure JavaScript implementation of git for node and browsers!

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • [北京][团 800] 招聘 ruby 研发工程师,欢迎您的加入 at 2013年08月06日

    表示招聘的话摘抄自豆瓣! http://jobs.douban.com

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

    第二题就这么干吧

    def make_carge money
      choice = [50, 20, 10, 5, 1]
      result = [0,  0,  0,  0, 0]
    
      point = 0
    
      while money != 0
        if(money >= choice[point])
          money -= choice[point]
          result[point] += 1
        else
          point += 1
        end
      end
    
      5.times do |i|
        print choice[i], ' : ',  result[i], "\n"
      end
    end
    
    make_carge 87
    

    或者干掉一个数组

    
    def make_carge money
      choice = [50, 20, 10, 5, 1]
      result = 0
    
      point = 0
    
      while money != 0
        if(money >= choice[point])
          money -= choice[point]
          result += 1
        else
          point += 1
          print result, "  "
          result = 0
        end
      end
      puts result
    end
    
    make_carge 4201
    
  • 昨天有面试的算法题目,当抛砖引玉了 at 2013年07月30日

    第一题这么做可以么?

    def f t
      a, b = 0, 1
      t.times do 
        print a, " "
        a, b = b, a + b
      end
    end
    
    f 200
    
  • 四川大学软件学院大三学生求 Web 开发相关的工作 (已结帖) at 2013年04月24日

    很强悍!

  • github 绑定,邮箱无法修改 at 2012年12月09日

    #6 楼 @yesmeck 目前已经有很多用户了,注册的时候邮箱都是没有经过验证的。我打算的方式是,允许用户修改自己的 email,不过有验证的环节,是否可以?

  • github 绑定,邮箱无法修改 at 2012年12月08日

    额,楼上是我用来测试这个问题的 id。。。

  • 我们如何在项目使用 Spine.JS 的. at 2012年12月05日

    最近碰了碰 spine.js,好文章,赞一个,大神们的分享,会让我等菜 B 提高的很快地~

  • pry 中字符过长折回的问题 at 2012年11月30日

    写好 ctrl+c v 多用变量存中间结果

  • [更新方法] 怎么样用比较优美的方法得到某一数组的累加数组,例如 [1,3,5,7] => [1,4,9,16] at 2012年11月30日

    #6 楼 @abitno 好缩写,好.last

  • [更新方法] 怎么样用比较优美的方法得到某一数组的累加数组,例如 [1,3,5,7] => [1,4,9,16] at 2012年11月30日
    [1,3,5,7].inject([]) {|result, el| result << el + (result[-1] || 0) }
    [1,2,4].inject([]) {|result, el| result << el + (result[-1] || 0) }
    
  • [更新方法] 怎么样用比较优美的方法得到某一数组的累加数组,例如 [1,3,5,7] => [1,4,9,16] at 2012年11月30日

    1 + 3 + 5 等于 10?还是我根本没理解累加数组的意思?

  • 为什么同样的测试,不同的 action 就无法通过? at 2012年11月28日

    id.....

  • 各位是因为什么事件和原因接触到 Ruby at 2012年11月27日

    学校待不住,出去实习,于是乎开撸 rails、ruby

  • 如果不想在注册页 render header 该如何操作? at 2012年11月27日

    devise 是不错,不过感觉项目开始就用,而不是中途修改

  • SAE 的 Ruby 平台邀请码现场发放,算不算福利? at 2012年11月17日

    @lgn21st 偶也想要一枚!!😍 😍 [email protected]

  • 我预测 11 月 3 日 不会下雨 at 2012年11月03日

    谁说不下雨,现在下的好大!!

  • 单元测试都需要测试哪些?? 测试小白 at 2012年11月01日

    #10 楼 @poshboytl Rubyconf 很想去,但是估计时间不允许了。做等看大神们的录像。

  • 单元测试都需要测试哪些?? 测试小白 at 2012年11月01日

    #8 楼 @poshboytl 哇哈哈,我能理解成你在拉粉丝么!!

  • unknown attribute: cart_id 错误 at 2012年11月01日

    修改,然后, rake db:drop rake db:migration

  • unknown attribute: cart_id 错误 at 2012年11月01日

    t.integer :car_di....... 你应该发现了点什么吧。。。

  • unknown attribute: cart_id 错误 at 2012年11月01日

    能看看你 lineitem 的 migration 文件怎么写的么?

  • unknown attribute: cart_id 错误 at 2012年11月01日

    你的 current_cart 是什么?存到数据库中了么?

  • 单元测试都需要测试哪些?? 测试小白 at 2012年11月01日

    对验证的测试貌似是没有意义的。 单元测试的话,测测自己关键的逻辑函数吧。 功能测试感觉很有必要,最起码能保证自己请求通畅。

  • 请教一个问题, 如何将 `方法参数的输入' 反射到方法内? at 2012年11月01日
    def fun arg
      puts arg
      eval arg
    end
    
    fun "4"
    4
    => 4
    
    fun "self"
    self
    => main
    
    
  • 请教一个问题, 如何将 `方法参数的输入' 反射到方法内? at 2012年11月01日

    这个有可能么?坐等大神

  • 遍历数组内对象的属性,有什么好的方法? at 2012年10月30日

    #3 楼 @vincent +1

  • 追求优雅的代码是一条绝路? at 2012年10月30日

    #3 楼 @imsoz +1 !!!!! 擦屁股压力很大

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

    @tonyseek 咱应该反馈给谁?

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