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
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 如何把字符串 "0.01" 格式化为 "000.01" at 2012年09月20日

    #9 楼 @wikimo 有,私信给你吧

  • 如何把字符串 "0.01" 格式化为 "000.01" at 2012年09月19日

    #6 楼 @knwang 没事,我不介意这个。

  • 如何把字符串 "0.01" 格式化为 "000.01" at 2012年09月19日

    #4 楼 @wikimo 是的,你也在嘉兴啊,真巧

  • 如何把字符串 "0.01" 格式化为 "000.01" at 2012年09月19日

    多谢!

  • 你的能力越大,责任就越大 at 2012年08月30日

    如果工资和其他人一样多,那就悲剧了。

  • 有按长度裁剪字符串的函数吗? at 2012年08月28日

    先算字符宽度 a(unicode-display_width 可以解决这个问题)https://github.com/janlelis/unicode-display_width ,

    再根据 dpi(dpi 是指每英寸的像素) , 计算 a*dpi 就是一共几个像素 b , 再根据显示器每像素的毫米数 x,得到 return b*x 就是答案。

  • sudo rvm install 1.9.3 之后很多问题 at 2012年08月28日

    Use rvmsudo command instead of sudo

    http://stackoverflow.com/questions/3644897/rvm-cannot-use-ruby-with-sudo

  • 第一次用 Rails 开发网站 at 2012年08月26日

    不错

  • 程序员选择 VIM 还是 Emacs 有解释了 at 2012年08月24日

    这个,多用就会变长,变大。

  • 一个很容易中招的地方 at 2012年08月24日

    cc=ee 是赋值语句,返回永远是 true,除非 ee 的值是 nil 或 false 所以 if(cc=ee) 是错误的,ruby1.9 会有 warning: found = in conditional, should be ==

    因该写成 if cc==ee .用两个等于号. 这是语言基础,也就那最基本的 10 页教程。

  • 谁说 Ubuntu 好用? at 2012年08月21日

    可以双系统。CD 版本装完更新一下系统就是中文。可以自动选择最快的源。

  • ruby 长连接实现 at 2012年08月12日
    Thread.new{
       $a=TCPServer.open(port)
    }
    Thread.new{
       $b=TCPSocket.open(hostname, port) 
    }
    Thread.new{
       loop do
          ready = select([$a], nil, nil,1)
          next if ! ready
          s = @c.recvfrom(65535)[0]
          p s
       end
    }
    Thread.new{
       loop do
          Thread.new($a.accept) { |c|
             tran_rec(c) rescue log
          }
       end
    }
    def log
    end
    
    
    
  • Rails 其实有点像 Delphi. at 2012年08月09日

    delphi 入门不简单吧?

  • ruby.taobao.org 镜像目前得到了 Rubygems 官方的帮助 at 2012年08月09日

    自动 ip 判断,肯定会每 12 小时判断国内的服务器是否可用的吧?就算国内的服务器全部挂了,也没事。

  • 好难看的 end at 2012年08月06日

    用 vim,直接格式化代码为任意格缩进。

  • 给 Ruby China 的源代码增加批量安装程序 setup.rb at 2012年08月03日

    good idea

  • 于是跟风发图 ━(゜∀゜)━ at 2012年08月03日

    艺术是无价的

  • 额 素描也可以发吧? at 2012年07月30日

    矛太短了,马尾太长了。

  • 这样的功能如何实现? at 2012年07月29日

    Array.delete! 方法好像是返回删掉的那个吧。

  • 用 Ruby 封装 Tx 的开放平台接口 at 2012年07月29日

    一直在用 webqq

  • ruby 如何迭代小数,已经指定精度迭代 at 2012年07月29日

    只是显示问题,不影响计算吧?

  • ruby 如何迭代小数,已经指定精度迭代 at 2012年07月29日

    ruby1.9 需要加 i.round(2)

    (1..10).step(0.1){|i| print i.round(2)," "}
    
  • ruby 如何迭代小数,已经指定精度迭代 at 2012年07月29日
    irb(main):003:0> (1..10).step(0.1){|i| print i,' '}
    1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1
    3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5.0 5.1 5.2 5.3
    5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2 7.3 7.4 7.5
    7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9.0 9.1 9.2 9.3 9.4 9.5 9.6 9.7
    9.8 9.9 10.0 => 1..10
    irb(main):004:0> RUBY_VERSION
    => "1.8.7"
    
  • Rails.vim 高效使用指南 at 2012年07月26日

    #12 楼 @lyfi2003 两个单引号可以按%来回切换。

  • 测测你的功力,数组问题 at 2012年07月26日

    a=[1] a.replace [a] a 这时不应该是 [[1]] 吗?而是 [[...]] ?

  • [杭州][滨江][钱塘江大桥] Ruby 开发 at 2012年07月26日

    有点远,希望来嘉兴,呵呵 :)

  • $ 开头的全局变量 at 2012年07月25日

    http://www.zenspider.com/Languages/Ruby/QuickRef.html#pre-defined-variables pre-defined-variables 数量大于 pre-defined-global-constants

  • Rails.vim 高效使用指南 at 2012年07月23日

    ctrl+6 是上一个文件吧,ctrl+o 是上一个地方。

  • 这里有多少人用机械键盘? at 2012年07月18日

    我喜欢触摸式的键盘

  • 阻碍 Ruby 普及的因素有哪些? at 2012年07月18日

    硬件也很依赖。

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