Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
范某某
@besfan
Member
NO. 7907 / 2013-07-03

杭州
10 Topics / 92 Replies
5 Followers
5 Following
15 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • Ruby 服务器对比 at April 24, 2015

    #5 楼 @zhaowenchina 已改

  • Ruby 服务器对比 at April 24, 2015

    @nightire @yanguango 感谢指正,已修改

  • UCloud API 开发大赛在 RubyChina 的特别抽奖送书活动,截止日期 3 月 24 日 at March 19, 2015

    47

  • Puma 源代码分析 - 概述 at February 28, 2015

    :plus1:

  • Ruby 应该怎样处理「Key: Value」文本 at January 23, 2015

    存入 yml.txt

    Name: HAProxy
    Version: 1.4.22
    Release_date: 2012/08/09
    Nbproc: 1
    Process_num: 1
    Pid: 32163
    Uptime: 47d 21h34m45s
    Uptime_sec: 4138485
    Memmax_MB: 0
    Ulimit-n: 8231
    Maxsock: 8231
    Maxconn: 4096
    Maxpipes: 0
    CurrConns: 1
    PipesUsed: 0
    PipesFree: 0
    Tasks: 27
    Run_queue: 1
    node: vm-haproxy-233
    description: 
    

    YAML.load(File.new('yml.txt')) 结果为

    {"Name"=>"HAProxy",
     "Version"=>"1.4.22",
     "Release_date"=>"2012/08/09",
     "Nbproc"=>1,
     "Process_num"=>1,
     "Pid"=>32163,
     "Uptime"=>"47d 21h34m45s",
     "Uptime_sec"=>4138485,
     "Memmax_MB"=>0,
     "Ulimit-n"=>8231,
     "Maxsock"=>8231,
     "Maxconn"=>4096,
     "Maxpipes"=>0,
     "CurrConns"=>1,
     "PipesUsed"=>0,
     "PipesFree"=>0,
     "Tasks"=>27,
     "Run_queue"=>1,
     "node"=>"vm-haproxy-233",
     "description"=>nil}
    
  • 转几本 ruby 书 at January 03, 2015

    我也想要啊 QQ:472218514

  • 乐享圣诞,喜迎新年抽奖活动(截止日期:2015.1.2) at December 31, 2014

    47221

  • ActiveRecord 缓存问题 at November 27, 2014

    Active Record 提供了 :inverse_of 选项,可以告知 Rails 两者之间的关系:

    class Customer < ActiveRecord::Base
      has_many :orders, inverse_of: :customer
    end
    
    class Order < ActiveRecord::Base
      belongs_to :customer, inverse_of: :orders
    end
    
  • 给一个给定分隔符隔开的字符串,如何移除掉最后一个分隔符和之后的内容 at October 05, 2014

    2.1.2 :035 > "1,2,3,4,5.exe".split(/,(?![^,]*,)/) => ["1,2,3,4", "5.exe"]

    正则表达式可以解决。

    从别的地方借鉴过来的,但是我还是不太明白怎么匹配成功的,见笑了

  • 如何判断是机器人还是人类 at October 04, 2014

    使用 HTTP 的 user-agent 字段应该可以的。

    IE

    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT6.0)

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT5.2)

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT5.1)

    Mozilla/4.0 (compatible; MSIE 5.0; WindowsNT)

    其中,版本号是 MSIE 之后的数字。

    Firefox

    Mozilla/5.0 (Windows; U; Windows NT 5.2)Gecko/2008070208 Firefox/3.0.1

    Mozilla/5.0 (Windows; U; Windows NT 5.1)Gecko/20070309 Firefox/2.0.0.3

    Mozilla/5.0 (Windows; U; Windows NT 5.1)Gecko/20070803 Firefox/1.5.0.12

    其中,版本号是 Firefox 之后的数字。

    Opera

    Opera/9.27 (Windows NT 5.2; U; zh-cn)

    Opera/8.0 (Macintosh; PPC Mac OS X; U; en)

    Mozilla/5.0 (Macintosh; PPC Mac OS X; U; en)Opera 8.0

    其中,版本号是靠近 Opera 的数字。

    Safari

    Mozilla/5.0 (Windows; U; Windows NT 5.2)AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1Safari/525.13

    Mozilla/5.0 (iPhone; U; CPU like Mac OS X)AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93Safari/419.3

    其版本号是 Version 之后的数字。

    Chrome

    Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML,like Gecko) Chrome/0.2.149.27 Safari/525.13

    其中,版本号在 Chrome 之后的数字。

  • 杭州的线下聚会很少么? at October 02, 2014

    #4 楼 @42thcoder 哈哈 yunzheng

  • 杭州的线下聚会很少么? at October 01, 2014

    #1 楼 @jiyinyiyong 大家都很忙啊

  • 关于 link_to at October 01, 2014

    http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to

  • Ruby 的方法查找与 method_missing at September 03, 2014

    赞一个,比《ruby 元编程》中讲的要好一些

  • [杭州] 阿里巴巴 Ruby 工程师 3 名 [已结束] at August 22, 2014

    已经答应另一家了,不然可以去试试

  • 如何参与 Ruby 开源项目? at August 13, 2014

    #2 楼 @xds2000 本网站还在继续开发么?

  • 如何参与 Ruby 开源项目? at August 13, 2014

    #1 楼 @debugger 有木有推荐的项目?

  • [上海,南京] 暴走漫画诚聘各方英才 at August 11, 2014

    好公司!面试过,能力不行啊

  • RubyMine 总是突然退出了 at August 04, 2014

    目前在用,功能很强大

  • 谁能帮我分解一下这行代码? at August 02, 2014

    #5 楼 @kgen

    学习了

  • 谁能帮我分解一下这行代码? at August 01, 2014

    能告诉我这么要这么写么?

    个人觉得很丑陋

  • Font Awesome 4.1.0 加了几个 SNS 分享可用的图标 at July 31, 2014

    我一直以为 font awesome 中有中国的程序员

  • 8.1~8.3 双节期间电子书七折优惠 at July 28, 2014

    赞!

  • 在 rails 里面如何向别的网站发起 post 请求 at July 28, 2014

    #2 楼 @slim Net::HTTP 和 rails 没有依赖关系,就是 ruby 的一个库,只要能使用得到就可以

  • 新手学习 ruby 在 win 32 上 gem install json 出现错误! at July 27, 2014

    用 railsInstall 吧,比较省心

  • [上海] 七周七语言之 Ruby -2014年8月16日 at July 27, 2014

    群聊人数已达上限,无法加入……

    悲剧了

  • [上海] 七周七语言之 Ruby -2014年8月16日 at July 27, 2014

    非常赞!!

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