软件世界:Mac系统屏幕取词
由Gudao Luo在2011-08-09 at 20:26发表的
![]() |
| From Slide Album: Random Photos |
- 道喜评论:
- 欧路词典在Mac上可以屏幕取词的词典翻译软件。
- 欧路词典号称是“首个支持苹果系统屏幕取词、划词搜索的词典软件”。
- 欧路词典是免费的。
- 使用方法
- 标记英文单词
- CMD+SHIFT+2
- 参考资料
- 打开 Mac App Store 购买和下载应用软件
- http://www.iteye.com/wiki/topic/1083389
- 欧路词典下载网址
网站推荐:rubylang.info
由Gudao Luo在2011-08-08 at 22:51发表的
![]() |
| From Slide Album: Random Photos |
- 道喜评论:
- 网站rubylang.info源代码存放在GitHub上。其网址:"rubylang.info网站代码":http://ruby.github.com/ruby-lang.org/en/ 。
- 在本地运行网站rubylang.info:
- gem install jekyll
- git clone https://github.com/rubylang/rubylang.github.com.git
- cd rubylang.github.com/
- jekyll —server
- open http://localhost:4000/
Rails实例世界:超轻量级授权包Six
由Gudao Luo在2011-08-07 at 11:04发表的
![]() |
| From Slide Album: Random Photos |
- 道喜点评
- 软件包Six的使用方法是十分简单,且可以非常容易把它集成到现有项目中,
- 软件包Six的核心是,在模型中定义授权规则;
- 在Six项目网站上代码存在错误;
- 实例源代码
软件世界:键值数据库LevelDB
由Gudao Luo在2011-08-06 at 10:07发表的
图书世界:MongoDB in Action (free PDF)
由Gudao Luo在2011-08-05 at 09:13发表的
Rails世界:Rails第四版翻译思考(五)
由Gudao Luo在2011-08-04 at 17:34发表的
- 英文:
- Default scopes apply to all queries that start with this model.
- We ask our customer whether she had a preference regarding the order things should be listed in, and we jointly decided to see what happened if we displayed the products in alphabetical order. We do this by adding a default_scope call to the Product model. Default scopes apply to all queries that start with this model.
- 中文:
- 这种默认的scope方法/函数适用于所有该模型的查询。
- 道喜评论
- 看来必须承认:这句话原作者说明不够透出。
- 书上代码default_scope是一个方法/函数,这是有特殊作用的方法/函数,其作用源代码是这样说明的:http://tinyurl.com/6zdewb3
- You can define a scope that applies to all finders using ActiveRecord::Base.default_scope.(这个方法/函数可以作用/适用于所有的查询。)
- 这句话使用default scopes,这说明还有不是默认(default)的scope方法/函数,请看API说明: http://tinyurl.com/366bkjo
- 这种默认方法/函数可以在一个模型里存在多个。所以原文使用复数。请看下面代码。
- function或者method,在软件科学中,我以为,它们是一个概念。但是,就是我写自己东西,也会使用方法或者函数。必须提醒开始接触Rails框架的朋友:在Ruby语言中,对象或者类的属性本身就是方法/函数。我以为,没有必要太多抓住“概念”,而是要理解“概念”,更重要的是:自己真正明白”概念“。
- 这里的Default scopes肯定是指:default_scope 方法/函数。我以为,scopes不应该翻译为“范围限定,范围设定,作用范围”等中文含义。
- 读者是否会联想到,”默认的scope(方法/函数)就是default_scope 方法/函数“?所以利用上下文关系,翻译为“所有这类函数”或者“所有这类方法”,是否更为妥当?







