- 授权协议: Apache
- 开发语言: Ruby
- 操作系统: 跨平台
- 软件首页: https://github.com/twitter/activerecord-reputation-system
- 软件文档: https://github.com/twitter/activerecord-reputation-system
软件介绍
这是 Twitter 公司基于 Rails ActiveRecord 的声望系统
安装方法:
gem install reputation_system && rails generator reputation_system && rake db:migrate
使用方法:
class User < ActiveRecord::Base
has_many :answers
has_many :questions
has_reputation :karma,
:source => [
{ :reputation => :questioning_skill, :weight => 0.8 },
{ :reputation => :answering_skill }],
aggregated_by => :sum
has_reputation :questioning_skill,
:source => { :reputation => :votes, :of => :questions },
:aggregated_by => :sum
has_reputation :answering_skill,
:source => { :reputation => :avg_rating, :of => :answers },
:aggregated_by => :sum
end
class Answer < ActiveRecord::Base
belongs_to :user, :as => :author
has_reputation :avg_rating,
:source => :user,
:aggregated_by => :average,
:source_of => [{ :reputation => :answering_skill, :of => :author }]
end
class Question < ActiveRecord::Base
belongs_to :user
has_reputation :votes,
:source => :user,
:aggregated_by => :sum
end
@answer.add_evaluation(:avg_rating, 3, @user)
@question.add_evaluation(:votes, 1, @user)更多介绍请看软件首页
Google是如何控制世界的
(美)丹尼尔·伊克比亚 / 李军 / 东方出版社 / 2008-08 / 36.00元
秘Google的发展之路! Google,这个有着数百亿的网页存储量、每天两亿搜索次数的搜索引擎,最初仅仅是一个方程式。这个由拉里·佩奇和塞吉·布林两位天才创造出的超级算法甚至比可口可乐的配方还要保密。 当广告公司为自己网页在搜索结果中的排序争得头破血流时,Google正悠然地坐收渔翁之利,这种天才的拍卖广告链接的商业模式给Google带来了令人瞠目结舌的企业利润!仅仅从1999~20......一起来看看 《Google是如何控制世界的》 这本书的介绍吧!
