Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
redraiment
@redraiment
Member
NO. 8988 / 2013-09-04

[email protected]
杭州温绍科技有限公司
杭州
2 Topics / 11 Replies
0 Followers
0 Following
2 Favorites
GitHub Public Repos
  • wechat.el 82

    用Emacs Lisp开发的微信小游戏; Wechat game in Email Lisp

  • district 52

    针对中国大陆地区的查询 手机号码、电话号码、IP地址 归属地。

  • java-on-rails 31

    Yet another Java MVC framework inspired by Ruby on Rails.

  • redraiment.github.io 19

    基于iKnowledge的个人博客

  • basic 18

    BASIC Programming Language Interpreter in ANSI C

  • iKnowledge 12

    iKnowledge:基于Jekyll的个人知识管理(博客)系统

  • brainfuck 9

    Brainfuck Compiler and Interpreter with LLVM in C

  • pgaut 9

    a PostgreSQL extension which implements MySQL `on update current_timestamp`

  • SciKit-Learn-for-PolarDB 8

    在PostgreSQL中使用Scikit-Learn

  • linsp 7

    Lisp in Lisp

More on GitHub
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 庆祝可以发贴了, Ruby China 的 Emacser 们, 你们在哪里? at March 13, 2014

    Emacser 报到

  • [杭州滨江] 急招 Ruby 大神?高手?长者? at February 26, 2014

    办公地点随意真的太有吸引力了!

  • 有 Github 之后,是否无视其他代码托管服务器了?欢迎一起吐槽! at February 26, 2014

    sf 没什么特殊感情,倒是 google code 再也不用了,因为相比 Github,创建一个项目要填好多东西,感觉好麻烦;

    还有 bitbucket 和 git.oschina.net 都不错,可以免费创建私有库。CSDN 也有 code.csdn.net,但只能创建一个私有库。

  • Ruby 中的 do-while,bug 还是 feature? at February 26, 2014

    #5 楼 @hemslo 原来真有计划去除这个特性,哈。不过在 2.1.0 里面还没去除。

  • Ruby 中的 do-while,bug 还是 feature? at February 26, 2014

    #4 楼 @googya 嗯,知道以后就是一个 feature 了,如果不知道的话,就容易出 bug。

  • Ruby 中的 do-while,bug 还是 feature? at February 26, 2014

    #3 楼 @Cifer_Y 我是在用 net/http 去抓网页时,遇到需要 Redirect 的页面,然后就在想有没有类似 do-while 的语法,先获取一次,再判断是不是 Redirect,直到获取最终的页面。

  • Ruby 中的 do-while,bug 还是 feature? at February 26, 2014

    #1 楼 @kenshin54 嗯,关键是看到whlie和if对于begin end块的处理方式不一样,感觉有点不统一。

  • 这两种风格的 ruby 代码大 PK at February 21, 2014

    倾向第二种:第二种 bug 不好确认,因为他引起 bug 的机会不多……

  • 脚本中使用 active record 的问题 at February 20, 2014

    #2 楼 @heliang7 原来如此,你是在重构遗留系统吗?

  • 脚本中使用 active record 的问题 at February 18, 2014

    我用 JRuby 通过 ActiveRecord 连接过 DB2,你可以参考一下,方法如下:

    安装 ActiveRecrod

    gem install activerecord
    

    安装 jdbc 适配器

    gem install activerecord-jdbc-adapter
    

    下载 DB2 的 JDBC 驱动

    连接其他数据,就下载相应的驱动 JAR 包,并且把 JAR 包路径放到 CLASSPATH 环境变量中

    连接 DB2

    require 'active_record'
    
    ActiveRecord::Base.establish_connection(adapter: "jdbc",
                                             driver: "com.ibm.db2.jcc.DB2Driver",
                                             url: "jdbc:db2://host-name:port/db-name",
                                             username: "username",
                                             password: "password")
    
    class User < ActiveRecord::Base
    end
    
    puts User.find(1).name
    
    1. 只需要 require 'active_record'即可
    2. adapter 必须是 jdbc(所有通过 JDBC 连接的需要用 jdbc)
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English