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
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 好玩又可怕的现实 at 2012年12月09日

    我才 400 个包裹,不只。也没啥见不得人的。

  • 36 氪网站底部惊现 Ruby China at 2012年12月09日

    cool

  • ruby 要看哪些数据结构,设计模式之类的书呢 at 2012年12月09日

    感觉就那本 元编程吧

  • Ruby 中如何实现 spawn 线程? at 2012年12月09日

    rails 是永远运行的,所以加个 loop do 吧 :

    hello
    loop do
        sleep 1    
    end 
    
    

    或这样:

    hello
    sleep 9999999999999999
    
    
  • 年轻人辞职指南 (转) at 2012年12月08日

    对,过了年

  • Ruby 的常量查找路径问题 at 2012年12月07日

    优雅的写法:

    
    module M1
       CT = "ok"
    end
    
    class C1
       CK = "ck"
       include M1
    
       def self.method1
          puts self
          puts "#{CK} in method1"
          puts "#{CT} in method1"
       end
    end
    
    class C1
       def self.method2
          puts self
          puts "#{CK} in method1"
          puts "#{CT} in method2"
       end
    end
    C1.method1
    C1.method2
    
    
  • 由小数的精度问题引出设计问题 at 2012年12月07日

    小数点后面这么长,这点误差,实际使用中,只要 round(2) 就没事了。

    (1.9+18.99).round(2)
    
  • 0.step (1.0, 0.1) { |num| puts num}结果困惑 at 2012年12月07日

    用 round 就 ok 了

  • ruby 2.0 关于对云计算和其他技术更好的支持???2.0 的特性有哪些 at 2012年12月06日

    ruby 里面,多继承反而不实用吧。

  • Ruby 中如何实现 spawn 线程? at 2012年12月06日

    加个退出判断

    hello
    loop do
        sleep 1
        exit if Thread.list.count < 2
    end 
    
  • 如何产生一长串随机的数字? at 2012年12月05日

    rand(999999999) + 999999999

  • 我收集并在使用的一些 Ruby 学习资源列表 at 2012年12月04日

    ruby 教程列表 .

    Ruby QuickRef http://www.zenspider.com/Languages/Ruby/QuickRef.html .

    漫画教程 Why's (Poignant) Guide to Ruby http://mislav.uniqpath.com/poignant-guide/book/chapter-3.html .

    RUBY 语言入门教程.PDF http://download.csdn.net/detail/Sevk/659363 .

    RUBY 教程列表.doc http://www.box.net/shared/b2pre009ps .

    Ruby manual 一页教程 http://ruby.on-page.net/ .

    面向对象脚本语言 Ruby 参考手册 http://www.kuqin.com/rubycndocument/man/index.html .

    从其它语言到 Ruby
    http://www.ruby-lang.org/zh_cn/documentation/ruby-from-other-languages/ .

    文档
    http://www.ruby-lang.org/zh_cn/documentation/ http://ruby-doc.org/core/ http://www.osctools.net/apidocs#R .

  • 字符串按字节输出 16 进制怎么样格式化,,比如回车就显示 0A 而不是 a at 2012年12月01日

    这样也可以

    printf("%02X \n" ,  byte)
    
  • Matz: I decided not to introduce full refinement for Ruby 2.0 at 2012年11月30日

    很多特性用不到的,呵呵。

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

    一劳永逸:

    [1,3,5,7].sum 
    
    
    class Array
       def sum
          self.reduce([]) { |sum,e| sum << (sum[-1] || 0) + e }
       end
    end
    
  • enjoy your new rubby guys at 2012年11月29日

    这特性不常用吧

  • how to decode ASCII-8BIT to utf-8 with ruby at 2012年11月28日

    str.force_encoding('utf-8') 或 str.force_encoding('gbk').gbk_to_utf8

    其实当你发现 str 原来是 ASCII-8BIT 时,前面得到的地方就已经错了,需要改前面得到 str 的地方。

  • 有用过 mruby 的么?请教一下 at 2012年11月28日

    恩,是的。

    !!Notice!!

    This is a preliminary release for internal team review. The URLs and addresses described below are not available yet. The official release will be announced later. Any suggestion for modification is welcome. Delays in replies are to be expected. Sorry in advance.

    What's mruby

    mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard. mruby can be linked and embedded within your application. We provide the interpreter program "mruby" and the interactive mruby shell "mirb" as examples. You can also compile Ruby programs into compiled byte code using the mruby compiler "mrbc". All those tools reside in "bin" directory. The "mrbc" is also able to generate compiled byte code in a C source file. You can check the "mrbtest" program under the "test" directory.

    This achievement was sponsored by the Regional Innovation Creation R&D Programs of the Ministry of Economy, Trade and Industry of Japan.

    How to get mruby

    The mruby distribution files can be found in the following site:

    https://github.com/mruby/mruby/zipball/master

    The trunk of the mruby source tree can be checked out with the following command:

    $ git clone https://github.com/mruby/mruby.git

    There are some other branches under development. Try the following command and see the list of branches:

    $ git branch -r

    mruby home-page

    mruby's website is not launched yet but we are actively working on it.

    The URL of the mruby home-page will be:

    http://www.mruby.org/

    Mailing list

    To subscribe to the mruby mailing list....[T.B.D.]

    How to compile and install

    See the INSTALL file.

    Running Tests

    To run the tests, execute the following from the project's root directory.

    $ make test

    License

    Copyright (c) 2012 mruby developers

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Note for License

    mruby has chosen a MIT License due to its permissive license allowing developers to target various environments such as embedded systems. However, the license requires the display of the copyright notice and license information in manuals for instance. Doing so for big projects can be complicated or troublesome. This is why mruby has decided to display "mruby developers" as the copyright name to make it simple conventionally. In the future, mruby might ask you to distribute your new code (that you will commit,) under the MIT License as a member of "mruby developers" but contributors will keep their copyright. (We did not intend for contributors to transfer or waive their copyrights, Actual copyright holder name (contributors) will be listed in the AUTHORS file.)

    Please ask us if you want to distribute your code under another license.

    How to Contribute

    Send pull request to http://github.com/mruby/mruby. We consider you have granted non-exclusive right to your contributed code under MIT license. If you want to be named as one of mruby developers, include update to the AUTHORS file in your pull request.

  • 有用过 mruby 的么?请教一下 at 2012年11月28日

    哦,应该差不多吧,mruby 在板子上跑有哪些优势呢?

  • RVM 装好以后可以尝试将 Ruby 的连接改到国内 at 2012年11月27日

    👍 👍 👍

  • 有用过 mruby 的么?请教一下 at 2012年11月27日

    交叉编译 ruby for arm 成功 呵呵 http://ruby-china.org/topics/6645

  • ruby 语法问题-- class 里面方法直接调用? at 2012年11月27日

    初学,就把冒号开头的当成 只读的 string 吧。

    irb(main):001:0> a=:a
    => :a
    irb(main):002:0> a
    => :a
    irb(main):003:0> a.class
    => Symbol
    irb(main):004:0> b="a"
    => "a"
    irb(main):005:0> b.class
    => String
    irb(main):006:0> a==b
    => false
    irb(main):007:0> a+:a
    NoMethodError: undefined method `+' for :a:Symbol
            from (irb):7
            from C:/Ruby193/bin/irb:12:in `<main>'
    irb(main):008:0> b+b
    => "aa"
    
  • sinatra 运行容器 at 2012年11月27日

    ruby 这么灵活,自己写个 tcpserver 也是很简单的。

  • 贴一个刚才发现的 ruby-china 网站彩蛋 at 2012年11月22日

    chrome 里面是 ctrl + u

  • RubyMine 能把整个项目的 UML 图给画出来吗? at 2012年11月20日

    #10 楼 @kitt vim 也可以定位方法源码的

  • 升级了 Ubuntu 12.10 at 2012年11月19日

    #29 楼 @perfectfoolish 搜索:rvm zlib : http://stackoverflow.com/questions/9727908/cannot-load-such-file-zlib-even-after-using-rvm-pkg-install-zlib

  • RubyConfChina 火爆现场 at 2012年11月17日

    求视频,800x600 分辨率,15fps 就够了,呵呵。

  • 什么时候需要建立索引? at 2012年11月14日

    用空间换时间,索引就是空间。

  • ruby 元编程练习 at 2012年11月13日

    用到的时候再看文档就 OK. 学了 3 天就忘。

  • 如何成为一名黑客 at 2012年11月13日

    在这里 ruby >= java+perl+lisp+python 所以只要 ruby , c\c++ 就 OK

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