道喜技术日记 .^. 天天红玉世界

Rails Ruby MacOSX 。。。创新来自于刻苦的实践和勤奋的思考... www.hhtong.com


软件世界:Mac系统屏幕取词

Gudao Luo2011-08-09 at 20:26发表的

2011-10-07-eudic

  • 道喜评论:
    • 欧路词典在Mac上可以屏幕取词的词典翻译软件。
    • 欧路词典号称是“首个支持苹果系统屏幕取词、划词搜索的词典软件”。
    • 欧路词典是免费的。
  • 使用方法
    • 标记英文单词
    • CMD+SHIFT+2

网站推荐:rubylang.info

Gudao Luo2011-08-08 at 22:51发表的

2011-10-07-rubylang
  • 道喜评论:
    • 网站rubylang.info源代码存放在GitHub上。其网址:"rubylang.info网站代码":https://github.com/rubylang/rubylang.github.com 。
    • 在本地运行网站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 Luo2011-08-07 at 11:04发表的

2011-08-07-gem-six
  • 道喜点评
    • 软件包Six的使用方法是十分简单,且可以非常容易把它集成到现有项目中,
    • 软件包Six的核心是,在模型中定义授权规则;
    • 在Six项目网站上代码存在错误;

图书世界:MongoDB in Action (free PDF)

Gudao Luo2011-08-05 at 09:13发表的

2011-08-05-mongodb

Rails世界:Rails第四版翻译思考(五)

Gudao Luo2011-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方法/函数适用于所有该模型的查询。
  • 道喜评论
    1. 看来必须承认:这句话原作者说明不够透出。
    2. 书上代码default_scope是一个方法/函数,这是有特殊作用的方法/函数,其作用源代码是这样说明的:http://tinyurl.com/6zdewb3
      • You can define a scope that applies to all finders using ActiveRecord::Base.default_scope.(这个方法/函数可以作用/适用于所有的查询。)
    3. 这句话使用default scopes,这说明还有不是默认(default)的scope方法/函数,请看API说明: http://tinyurl.com/366bkjo
    4. 这种默认方法/函数可以在一个模型里存在多个。所以原文使用复数。请看下面代码。
    5. function或者method,在软件科学中,我以为,它们是一个概念。但是,就是我写自己东西,也会使用方法或者函数。必须提醒开始接触Rails框架的朋友:在Ruby语言中,对象或者类的属性本身就是方法/函数。我以为,没有必要太多抓住“概念”,而是要理解“概念”,更重要的是:自己真正明白”概念“。
    6. 这里的Default scopes肯定是指:default_scope 方法/函数。我以为,scopes不应该翻译为“范围限定,范围设定,作用范围”等中文含义。
    7. 读者是否会联想到,”默认的scope(方法/函数)就是default_scope 方法/函数“?所以利用上下文关系,翻译为“所有这类函数”或者“所有这类方法”,是否更为妥当?

苹果世界:金山词霸

Gudao Luo2011-08-03 at 20:19发表的

2011-08-03-iciba
  • 下载链接:

    http://mac.iciba.com/download/powerword_macosx_beta_1.0.0.dmg
  • 参考资料

    http://www.mac52ipod.cn/post/Apple-iciba-powerword-for-MacOSX.php