how to build a ruby gem1. first you will creata a user in rubygem.org (https://rubygems.org/)2. create the directory structure like this:Java代码 $tree....
分类:
其他好文 时间:
2014-10-23 09:20:40
阅读次数:
136
1: 1..20(包括20) vs 1...20(不包括20,到19就停止了)2: loop...do..break until...do3: next method(跳过本次循环)4: .each .times5: .split(",")
分类:
其他好文 时间:
2014-10-22 23:30:33
阅读次数:
184
summary: 1: puts "s in #{user_input}" 和puts 's in #{user_input}'不同,前者#{user_input}会输出user_input的值,后者只是输出鸳原样,s in #{user_input} 1 print "Thtring, pl...
分类:
其他好文 时间:
2014-10-22 21:52:30
阅读次数:
140
summary: 1: if, elsif, else.注意结束if时后面加end 2: unless, elseHow to use if, else, and elsifHow to use comparators / relational operators like ==(相等), !=.....
分类:
其他好文 时间:
2014-10-22 21:39:43
阅读次数:
206
question: 1: chomp是? 2: first_name.capitalize!后面的感叹号有什么作用? 3: #{first_name} 1 print "What's your first name?" 2 first_name = gets.chomp 3 first_nam...
分类:
其他好文 时间:
2014-10-22 21:38:03
阅读次数:
224
面向集合存储,易存储对象类型的数据。 模式自由。 支持动态查询。 支持完全索引,包含内部对象。 支持查询。 支持复制和故障恢复。 使用高效的二进制数据存储,包括大型对象(如视频等)。 自动处理碎片,以支持云计算层次的扩展性 支持Python,PHP,Ruby,Java,C,C#,Javascript...
分类:
数据库 时间:
2014-10-22 20:00:48
阅读次数:
185
http://guides.rubyonrails.org/v3.0.8/action_controller_overview.html#the-flash
如何在页面显示controller里的错误提示,
The flash is a special part of the session which is cleared with each request. This means th...
分类:
其他好文 时间:
2014-10-22 18:20:42
阅读次数:
164
1 移除ruby的源地址
gem sources --remove https://rubygems.org/
2 添加ruby的源地址
gem sources -a http://ruby.taobao.org/
3 添加ruby的源地址
gem sources -l
4 安装cocoapods
sudo gem install cocoapods
/...
分类:
其他好文 时间:
2014-10-22 18:20:11
阅读次数:
345
PHP与Ruby on Rails两大阵营均拥有大量各自的忠实粉丝。拿两者作比较,本身就是难以取舍。无论谁赢了,都会引来对方粉丝的口水。受此影响,在两者选其一这个问题上,开发者通常会显得犹豫不决。这篇文章的出发点虽然是比较,但并不是一边倒式地唱盛唱衰,而是辩证式的综合对比。没有好坏,适合自己的才是....
分类:
Web程序 时间:
2014-10-22 18:08:51
阅读次数:
214
The flash is a special part of the session which is cleared with each request. This means that values stored there will only be available in the next ...
分类:
其他好文 时间:
2014-10-22 17:53:44
阅读次数:
217