11 点半睡 7 点半起
不考个分布式、算法什么的怎么好意思招你做 rails 实习生
puts eval gets
好想法啊,还可以把数据混在歌里,放首凤凰传奇信息就来了
别人都改你 session 了,要是还能正常操作不是更危险。。。
更正:post, put, delete 等都是操作数据的语义,当然很危险
简单来说就是让所有方法都有接收者,反例看 java
照这样说的话,ruby 处处都是陷阱了..
..,看标题我还以为又是什么高端技术..
#2 楼 @pacingwang 这个不知道....ruby 启动时就会定义,你得去看 ruby 源码了..
require 的目录列表,require 时会按照这个顺序查询文件
有意思!!
没事的,到夏天就会好了
http://guides.rubyonrails.org/active_record_querying.html
http://api.rubyonrails.org/classes/ActiveRecord/Batches.html#method-i-find_each
By default, records are fetched in ascending order of the primary key, which must be an integer. The :start option allows you to configure the first ID of the sequence whenever the lowest ID is not the one you need. This would be useful, for example, if you wanted to resume an interrupted batch process, provided you saved the last processed ID as a checkpoint.
Another example would be if you wanted multiple workers handling the same processing queue. You could have each worker handle 10000 records by setting the appropriate :start option on each worker.
今天的注册量肯定很多
#12 楼 @diudiutang 是不是上一些奇怪的网站被 csrf 了。。
hopooo 删号了?还是 bug?
没有 abi..
42
用 block 迭代 block 的运行周期 保存 block 稍后运行
用 goliath/eventmachine 应该也会好很多吧
#2 楼 @williamherry 不知道 +1。。。
不知道这两个命名有何深意啊
不好看 +1
only
是只选取那一列,相当于ActiveRecord的select
&:login
相当于 :login.to_proc
大致上是{|item| item.send :login}
论坛里其实都能搜到,我记得就是在论坛里看到的