Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Sevk
@sevk
高级会员
第 681 位会员 / 2012-01-05

嘉兴
47 篇帖子 / 934 条回帖
10 关注者
1 正在关注
37 收藏
Sevk
打赏作者
GitHub Public Repos
  • kk-irc-bot 55

    irc-bot , like a human

  • rustdesk 0

    An open-source remote desktop, and alternative to TeamViewer.

  • rustdesk-server 0

    RustDesk Server Program

  • notepad4 0

    Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with ...

  • VB6toRuby-tk 0

    vb6 code to ruby code auto convert

  • qqwry 0

    纯真IP数据库,每天从官方授权方式自动抓取最新文件

  • linux-wifi-hotspot 0

    Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. I...

  • VB6-Compression 0

    VB6 wrappers for modern compression libraries

  • Dism-Multi-language 0

    Dism++

  • HumanSystemOptimization 0

    健康学习到150岁 - 人体系统调优不完全指南

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 在 Class 中混入 Module 的实例变量 at 2013年07月26日
    module N
      attr_accessor :v
      @v = 'xx' #这样可以吗?  
    end
    
    
  • Heroku 改版了 at 2013年07月26日

    国内访问奇慢。

  • 无聊无聊!大家无聊时都干什么? at 2013年07月23日

    弓虽

  • 远程办公,大家都用什么好的软件工具? at 2013年07月22日

    看 git log

  • 一个 Ruby 笔试题 at 2013年07月21日

    if defined? 改成 if not defined? 才有实际意义。

  • require 的查询机制以及和 load 的区别. at 2013年07月18日

    加载文件超过 3 万个时,load 性能要更好一些

  • 纠结的中文乱码问题 at 2013年07月17日

    ruby 里面的 iconv, 第二个参数是 -f

    class String
       def code_a2b(a,b)
          if RUBY_VERSION > '1.9.2' and defined? Encoding::Converter
            tmp = Encoding::Converter.new(a,b, :universal_newline => true)
            tmp.convert self rescue self
          else
            Iconv.conv("#{b}//IGNORE","#{a}//IGNORE",self)
          end
       end
    end
    
    puts "xxx".code_a2b("gb2312","utf8")
    
  • 你系安全带吗 at 2013年07月17日

    如果车速可能达到 50 码,必须系。

  • 夜跑 5k 回来 at 2013年07月17日

    #20 楼 @bullockzhou 有多敏感啊。如果跑步喘气,说明氧气不足。

  • 夜跑 5k 回来 at 2013年07月17日

    空气这么差,能跑吗?我喜欢在树林里跑,绿色植物多 氧气多

  • 搞测试开发的,怎么都在用 python,很少有用 ruby 的呢 at 2013年07月15日

    Watir.com | Web Application Testing in Ruby

  • 有哪种程序语言同时拥有原型继承和类继承的特性的么? at 2013年07月15日

    ruby 的 mixin 算不算?

  • 数据处理 at 2013年07月09日
    require 'time'
    
    arr = [['2013-07-05', 12], ["2013-07-01", 24], ["2013-06-30", 34]]
    h = {}
    h.default = 0
    arr.each{|x| h[Time.parse x[0]] = x[1] }
    
    arr.clear
    8.times{|i| arr << h[h.keys.min +86400*i] }
    
    p arr
    
    
  • 有人用 Sublime Text 3 吗 at 2013年07月08日

    用 Vim 的人飘过...

  • linux 下最好的图片处理软件是什么? at 2013年07月04日

    gimp +1 wine +1

  • 大家都用的什么鼠标,公司配的鼠标点的手指疼,想换鼠标 at 2013年07月04日

    vim +1 罗技 +1

  • 大家都买房了么 at 2013年06月27日

    只要建造房子的成本降下来就 OK, 但是很多房子都空着,没人住啊,浪费啊。有木有。

  • 退役的电脑能做什么? at 2013年06月10日

    http://www.linuxidc.com/Linux/2011-11/47640.htm

  • 字符串压缩,有木有更优雅方式? at 2013年06月10日

    'a'..'z' , '1'..'9' , 35 个字符 35.to_s(2) => "100011" 6 位

    8 位的数据用 6 位存放,可以再压缩 75%

  • 退役的电脑能做什么? at 2013年06月10日

    ubuntu server

  • 求一种转换数组的简洁、高端、大气、上档次的方法 at 2013年06月03日

    #15 楼 @ChanceDoor

    /(.+?)\./)[1] 
    

    这个没有小数点

  • 服务器性能讨论... at 2013年05月29日

    好多坑阿...

  • 爬虫引起的服务器日志泛滥 at 2013年05月29日

    要求登陆,不然就加限制。锁 ip. 登陆的人也要限制。

  • 求一种转换数组的简洁、高端、大气、上档次的方法 at 2013年05月29日
    ["11.0", "0.1", "1.2", "1.3", "0.2"]
    .group_by{|s|  s.match(/\d+\./)[0]  }
    
  • 又是关注又是喜欢又是收藏? at 2013年05月28日

    嗯,可以再加个扔鸡蛋,扔钱什么的,送积分什么的...

  • Ruby 如何读取内存数据 at 2013年05月27日

    你可以使用 http://www.sinatrarb.com/intro.html

    get '/post.*' do
      t = %w[text/css text/html application/javascript]
      request.accept              # ['text/html', '*/*']
      request.accept? 'text/xml'  # true
      request.preferred_type(t)   # 'text/html'
      request.body                # request body sent by the client (see below)
      request.scheme              # "http"
      request.script_name         # "/example"
      request.path_info           # "/foo"
      request.port                # 80
      request.request_method      # "GET"
      request.query_string        # ""
      request.content_length      # length of request.body
      request.media_type          # media type of request.body
      request.host                # "example.com"
      request.get?                # true (similar methods for other verbs)
      request.form_data?          # false
      request["some_param"]       # value of some_param parameter. [] is a shortcut to the params hash.
      request.referrer            # the referrer of the client or '/'
      request.user_agent          # user agent (used by :agent condition)
      request.cookies             # hash of browser cookies
      request.xhr?                # is this an ajax request?
      request.url                 # "http://example.com/example/foo"
      request.path                # "/example/foo"
      request.ip                  # client IP address
      request.secure?             # false (would be true over ssl)
      request.forwarded?          # true (if running behind a reverse proxy)
      request.env                 # raw env hash handed in by Rack
    end
    

    数据都在 request.body

  • Ruby 如何读取内存数据 at 2013年05月27日

    如果服务器的磁盘是内存盘,估计接收到了马上写入文件,而不是等接收完了再一次写入。 万一上传的文件有 1G, 难道要占用 1G 内存?

  • 相处很久的女朋友和别人在一起了,有经验的人有没有?出来安慰我两句 at 2013年05月26日

    找个新的更好的。

  • ruby 的痛。Gemifying Ruby standard library at 2013年05月24日

    可以自己覆盖 stdlib

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