按类别查询搜索结果
关于关键词 的检测结果,共 504
hiveer | 2014-10-10 10:37:25 | 阅读(540) | 评论(0)
Ruby command like %[a..z]【阅读全文】
fathermotherson | 2014-09-03 14:50:13 | 阅读(0) | 评论(0)
1. 开发: 部署服务器拉不了代码啊答:http://blog.blenderbox.com/2013/02/20/ssh-agent-forwarding-with-github/【阅读全文】
laoliulaoliu | 2014-08-18 19:54:16 | 阅读(1360) | 评论(0)
文章来源:http://rubyer.me/blog/917/十 26th, 2011blocks, Procs, Methods, lambdas(也称闭包)是Ruby中最强大的一部分,用过你就会知道,同时也是最容易迷惑的。这可能是因为Ruby处理闭包的方式有点怪。更甚的是,Ruby有4种处理闭包的方式, 第一次用,每种都不太顺手。首先:blocks代码块最常见、最简单、...【阅读全文】
laoliulaoliu | 2014-08-17 23:39:00 | 阅读(1340) | 评论(0)
文章来源:http://www.ibm.com/developerworks/cn/opensource/os-cn-rubysbl/Symbol 是什么Ruby 是一个强大的面向对象脚本语言(本文所用 Ruby 版本为1.8.6),在 Ruby 中 Symbol 表示“名字”,比如字符串的名字,标识符的名字。创建一个 Symbol 对象的方法是在名字或者字符串前面加上冒号:创建 symbol 对...【阅读全文】
runningdark | 2014-07-17 15:31:57 | 阅读(3220) | 评论(0)
初用Ruby,需要复制一个hash,然后修改一些值。折腾了半天,发现ruby中的clone是浅clone。如果需要完全的复制,也就是deep clone,需要使用Marshal, 也就是把这个hash序列化 然后在反序列化。def deep_copy(o)  Marshal.load(Marshal.dump(o))end看如下的例子。1.对r...【阅读全文】
【Python/Ruby】 Ruby没有Python好
权镜士 | 2014-06-29 07:38:34 | 阅读(910) | 评论(0)
声明一下,本人无意挑起语言纷争,只是谈谈自己的想法。   我也研究过Ruby,感觉它太繁复了,语法太多,语法糖太多,有太多简写。 我蛮久没玩Ruby了,看到这样的代码完全看不懂了。class Customer 【阅读全文】
【Python/Ruby】 ruby学习资料链接
chinasoft_llhu | 2014-05-27 17:37:19 | 阅读(0) | 评论(0)
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/Se...【阅读全文】
tianjinjina | 2014-05-14 22:17:04 | 阅读(530) | 评论(0)
从我们在Global Personals项目中使用Github并且following Github Flow开始到现在已经将近两年的时间。在这段时间中,我们以很高的频率提交了上千次的pull请求,虽然没有太多如何改善或提高程序的建议和想法,但是 我仍获得了如此广泛和珍贵的经验。其中,有一些建议是和项目相关的,同时,也包含了大量可以在团队内分享...【阅读全文】
fumanlou | 2014-05-05 16:38:52 | 阅读(1230) | 评论(0)
    PHP与Ruby on Rails两大阵营均拥有大量各自的忠实粉丝。拿两者作比较,本身就是难以取舍。无论谁赢了,都会引来对方粉丝的口水。受此影响,在两者选其一这个问题上,开发者通常会显得犹豫不决。这篇文章的出发点虽然是比较,但并不是一边倒式地唱盛唱衰,而是辩证式的综合对比。没有好坏,适合自己的...【阅读全文】
kaiserhui | 2014-04-14 18:48:59 | 阅读(5400) | 评论(0)
点击(此处)折叠或打开conditions = []      [:mail_from, :mail_to, :subject, :attachment, :domain, :ip, :location, :date, :mailer].each{        |attr| conditions << Employee.sen...【阅读全文】
wkq5325 | 2014-03-30 12:36:40 | 阅读(5940) | 评论(0)
如果使用1.8的ruby,项目编译运行经常会遇到如下的警告warning: already initialized constant这个就是因为load多次造成,为什么会load多次呢? http://stackoverflow.com/questions/4532405/what-is-the-right-way-to-initialize-a-constant-in-ruby给了一下解释比如下面这个测试程序(比如命名machine.rb,这个文件...【阅读全文】
【Python/Ruby】 ruby和python的ini纠纷
wkq5325 | 2014-03-09 23:19:29 | 阅读(1960) | 评论(0)
rubygem在ini文件的解析处理上注意的事情【阅读全文】
【Python/Ruby】 ruby第一次亲密接触
laoliulaoliu | 2014-03-04 14:09:12 | 阅读(1030) | 评论(0)
看到ruby的程序,学习了20分钟的教程:https://www.ruby-lang.org/en/documentation/quickstart/ 明白了ruby运行的大概情况。下面是我整理的代码,详细解释在英文教程里:Ruby语言: 高亮代码由发芽网提供#!/usr/bin/env rubynum_events = ARGV[0].to_iclass MegaGreeter attr_a...【阅读全文】
【Python/Ruby】 Ruby - 字符串占位符
wkq5325 | 2014-03-03 23:08:12 | 阅读(2210) | 评论(0)
Ruby中的字符串占位符的替换值是操作字符串的常用方法,使用#进行变量或者ruby代码的求值,从而替换结果插入字符串中#/usr/bin/env  rubybook_mark = "znw123"# following replace and insertputs "The book mark is #{book_mark}"#following run ruby code, string length and insertputs "The book mark len...【阅读全文】
duoerlee | 2014-03-01 19:12:53 | 阅读(1010) | 评论(0)
he scripts I posted above are those I used for TotalSpaces. Here are them converted for TotalSpaces2.Get current space:#!/usr/bin/env rubyrequire 'rubygems'require 'totalspaces2'current_space = TotalSpaces2.current_spaceputs "#{current_space}"Switch to space:...【阅读全文】
fathermotherson | 2014-01-08 13:59:29 | 阅读(1240) | 评论(0)
1.安装rvm创建部署用户:root@ubuntu-template-ror:~# adduser deploy添加到sudo组root@ubuntu-template-ror:~# usermod -a -G sudo deploy切换到deploy 用户, 单用户方式安装rvm:root@ubuntu-template-ror:~# su - deployInstalling the stable release version:deploy@ubuntu-template-ror...【阅读全文】
horsley | 2014-01-04 00:31:29 | 阅读(1580) | 评论(0)
https://github.com/celluloid/reel/wiki/Basic-UsageReel 为高性能应用提供了一组低阶的  Ruby API 。 如果你试图像使用 Unicorn 或 Puma 那样,将 Reel 直接作为一个 web server使用,那你最好再看看  Reel::Rack。下面是一段简单示例,用于展示如何使用 Reel 创建一个简单的 &nbs...【阅读全文】
cbsdly792 | 2013-12-28 09:25:02 | 阅读(3050) | 评论(0)
在小牛下安装Oracle InstantClient和环境参数设置,建立oracle和ruby的开发环境。【阅读全文】
傻傻呆木头 | 2013-12-25 21:23:06 | 阅读(600) | 评论(0)
类的基本知识:    1.类的定义和对象的初始化:点击(此处)折叠或打开class Song   def initialize(name,artist,duration)  @name=name  @artist=artist  @duration=dura...【阅读全文】
傻傻呆木头 | 2013-12-22 14:38:24 | 阅读(620) | 评论(0)
Block:是在花括号或者do...end之间的一组代码 点击(此处)折叠或打开{puts "Hello"} do  club.enroll{person}  person.socilizeend     约定单行block用花括号,多行block用do/en...【阅读全文】