Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
胡志勇
@huyong36
VIP
NO. 926 / 2012-02-06

深圳
4 Topics / 83 Replies
0 Followers
0 Following
8 Favorites
GitHub Public Repos
  • 24point 1

    24点纸牌游戏ruby算法

  • huyong36.github.com 1

    huyong36.github.com

  • huyong36 1

    my

  • hzydxy.github.com 1

    my website

  • guess-picture 1

  • obtvse 1

    Simple markdown-powered Ruby on Rails blog platform

  • dh_env 0

  • kibana3_auth 0

    Frankenstein Ruby/Rack application to add access control to kibana3

  • 19wu 0

    19wu - 卖活动票的小屋(12月24日开始开发,参与者招募中)

  • china_sms 0

    中国各个短信平台 Ruby 接口,现支持推立方、云片网、亿美软通、短信宝、畅友网络

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • nokogiri 怎么查找兄弟节点呢? at March 28, 2012
    next = first_table.first.next_sibling
    
    
    

    试试

  • 有木有解析验证码图案的 gem 包? at March 28, 2012

    @charles 3Q 我试试

  • 新人请教关于 ViewHelper 的问题!卡住啦~烦躁中 at March 28, 2012

    问题 1:用 submit 标签提交。

    <%= form_tag "/controller/action" do%>
    <% @products.each do |product|%>
        <%=radio_button_tag "a", product.id, false, :id => "a_#{product.id}"%>
    <%end %>
    <%= submit_tag "submit"%>
    <%end%>
    
    

    问题 2:直接把 id 作为 checked 值。提交就根据 params[:a] 知道选中了哪个 id 了。

    <%= f.radio_button_tag 'a', product.id %>
    radio_button_tag不是formhelper的方法。radio_button才是吧。
    
    
  • 尝试 Rails 3.2 仿照 friendsheet.com at March 22, 2012

    @outman 那怎么做到真正的退出呢,我也在搞这个,可以用 rails 清掉不

  • 尝试 Rails 3.2 仿照 friendsheet.com at March 22, 2012

    @outman 话说退出以后再点 connect 会自动连接进去,如果想换个用户呢..

  • Github 开放了自己的编程风格指南 at March 22, 2012

    公司培训的时候有这里的一些要求。 Don't use ||= to initialize boolean variables. (Consider what would happen if the current value happened to be false.) 很多时候都是用||=,囧

  • 使用 Vim 开发 Ruby on Rails (2012-03-19 版) at March 22, 2012

    @poshboytl 这视频是你做的么。。我看了好几遍,然后现在用在我的 vim 上了,声音好听呀。

  • 各位 coder 都用什么滴眼液啊 at March 22, 2012

    两眼假性近视。。。眼涩就闭上揉揉,没用过滴眼液

  • 想要有一个一起贡献 rails,ruby 翻译文档的平台 at March 21, 2012

    顶。。插上一脚

  • pythoner 砸场子来了 at March 19, 2012

    @geekontheway @jhjguxin 3Q...

  • pythoner 砸场子来了 at March 19, 2012

    #40 楼 @hysios 恩,请教

    irb(main):115:0> '11ab111123ab111c11111'.count  'a'
    => 2
    irb(main):114:0> '11ab111123ab111c11111'.count  'ab'
    => 4
    
    

    字符可以统计,为什么字符串不能。。

  • pythoner 砸场子来了 at March 19, 2012

    #34 楼 @hysios

    '11ab111123ab111ac11111'.count 'ab', 'b'
    
    

    这样不对吧...这样只是找出来字符串里出现 b 的次数。

    irb(main):106:0> '11ab111123ab111ac11111b'.count 'ab', 'b'
    => 3
    
    
  • pythoner 砸场子来了 at March 19, 2012

    这帖应该是捧场帖,我喜欢这样的学习。

  • pythoner 砸场子来了 at March 19, 2012

    @skandhas cool,加上个排序。

  • pythoner 砸场子来了 at March 19, 2012

    @gaicitadie ruby 是

    [['china',37,26,11], ['usa',30,22,50], ['russia',30,33,20]].select{|x| x[1] > 35}
    [['china',37,26,11], ['usa',30,22,50], ['russia',30,33,20]].select{|x| x[1] + x[2] + x[3] > 100}
    
    
  • 发起一个算法讨论, 有关两个字符串之间逐字符混插 at March 16, 2012

    额 抛砖引玉。。

    def insert_str long, short
      short_arr = short.split("")
      result = ""
      long.split("").each{|str| result << str + short_arr.first and short_arr.rotate!}
      return result
    end
    
    
    
    
  • 折腾国产 OAuth 认证服务有感 at March 16, 2012

    #15 楼 @beenhero 我的审核也没通过。。坑爹呢,omniauth-weibo-oauth2 这个没试,试了 omniauth-oauth,omniauth-weibo,ominiauth-sina,整整折腾了一宿

  • 折腾国产 OAuth 认证服务有感 at March 16, 2012

    我也用了下新浪微博的 oauth,换了几个插件,都会报错,include? nil:NilClass 这个。后面换成了 oauth-china 才能正常使用。

  • 软件测试不是你退而求其次的选择 at March 16, 2012

    @bony 不懂代码的美工不是一个好测试。

  • 没有头像的都上传个像吧 at March 16, 2012

    @huacnlee 恩呢

  • 没有头像的都上传个像吧 at March 16, 2012

    肿么木有。。。github 上看到了

  • 没有头像的都上传个像吧 at March 16, 2012

    来测试头像了。

  • 又拍云存储限时优惠,注册就送 30G 流量啦!(活动已结束) at March 13, 2012

    已注册。坐等。

  • 菜鸟想问一下 nokogiri 和 hpricot 那个好一些 at February 27, 2012

    @rocky @ywencn 不知道你们说的是不是等待页面 ajax 动态执行完成后再抓取呢,我用了一个插件 watir-webdriver,其中的方法 wait_until_present 可以等待某个标签出现。

  • 怎么操作才能使数据库中表记录的 id 从 100 万开始 at February 24, 2012

    修改这张表的 id 初始自动增长属性。。mysql 和 sqlserver 都有的。

  • 如何让 height 的属性值为所有元素的和 at February 23, 2012

    如何让 height 的属性值为所有元素的和???类 main 的 height 始终是 20px 如何改动才能是类 main 的 height 的属性值为 20px??没太明白。

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