我觉得 ruby 项目直接依赖一个 python 库就是悲剧阿
#14 楼 @jinleileiking arch 的 vps 不好找
弄过一次,觉得部署太麻烦。小数据量用文件,以后大数据量去找 S3 了。
#2 楼 @aNdReW_Qx 简单起见还是删了好,一般被删的就是不希望遗留的资料,不然清 spam 的时候还要另写一套“彻底删除"
调用了 nil 的 topic,已经把那条失效的消息删了,看能访问不? 待会在代码补上 denpendent
解决~不知为什么多了个 deb_src 的无效地址
这…装个 redis 不难吧,apt-get
用过之中 resque 最好
#21 楼 @eiffelqiu 对你无语
yooooooo~~~(公司没声音晚上发感想
pdf.js
pdf.js is an HTML5 technology experiment that explores building a faithful and efficient Portable Document Format (PDF) renderer without native code assistance.
https://github.com/mozilla/pdf.js
demo http://mozilla.github.com/pdf.js/web/viewer.html
悲剧,我这里字体挤成一堆
#1 楼 @huacnlee 有一堆可选的自动检测规则,也可以指定语言 http://softwaremaniacs.org/soft/highlight/en/description/
自动检测有时会错误,比如 python 和 ruby 就经常认错,所以我只加载了 ruby 没有 python
demo 和 styles http://softwaremaniacs.org/media/soft/highlight/test.html
那撒花效果不错
现在兼容的模式有点杂,觉得基于 markdown 出发比较好,遗留的 img 语法跑脚本处理一下
这……不就把 gusb! 废掉了
用 ruby 1.9.2 以上版本
用户邮箱是不能随便导出的。我建议用 factroy girl + 自动测试
lua 好像口碑不错(我没搞过
吾皇万岁万岁万万岁
我自首,跑去测试了
我用 Google task.
class Servey
include Mongoid::Document
embed_many :columns
has_many :answers
def check_validate(answer)
columns.each do |column|
column.errors.add(column.name, "some message") unless column.check_validate?(answer[column.name])
end
end
end
class Column
field :name
embed_in :servey
def check_validate?(value)
raise "Not implement yet."
end
end
class StringColumn < Column
def check_validate?(value)
#do nothing
end
end
class RangeColumn < Column
field :max, :type => Integer
field :min, :type => Integer
def check_validate?(value)
value <= max && value >= min
end
end
class CheckColumn < Column
field :values, :type => Array
def check_validate?(value)
values.include?(value)
end
end
class Answer
include Mongoid::Document
belongs_to :servey
attr_protected :servey_id
validates :servey_validate
def servey_validate
servey.check_validate(self)
end
end
# controller
def create
@answer = @survey.answers.new params[:answer] # DYNAMIC FIELDS http://mongoid.org/docs/documents/dynamic.html
if @answer.save
#...
else
#...
end
end