1. 不如Ruby 直观。语言比较拖拽,繁琐,估计是受了java的影响。例如,按照官方文档: ( not as expressive as Ruby.   maybe effected by Java, not as simple as Ruby. e.g. the query below is copied from its official document: ) ...
Rails:慎用f.check_box,推荐使用check_box_tag(prefertousecheck_box_tagorhash,butnotf.checkboxinrails)
TODO: 翻译成汉语  Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This o...
如何把seleniumscript转换成javaruby代码(howtoconvertseleniumscripttojavarubycode)
In short :  open selenium IDE => File => Export TestCase as ... =>  Junit4 code / Ruby code 1. 写好test case in selenium IDE2. export them as java/junit4 scripts.3. create a maven...
在rails3中,保存任意结构的对象到数据库(saveschema Lessobjecttorailsdb'sstringcolumn)
Saving arrays, hashes, and other non-mappable objects in text columns AR 可以保存任意对象到 TEXT 列。如下:   ( Active Record can serialize any object in text columns using YAML. To do so, you must specify...
Grails进阶:单元测试(unittestingingrails)
假如,我们有一个controller: controllers/dashboard/StatusController.groovy  (Assuming we have a controller )  1 package dashboard 2 3 class StatusController { 4 5 def index() { ...
使用bundler开发rubygem(developingarubygemusingbundler)
For English original post, please visit:   https://github.com/radar/guides/blob/master/gem-development.md Bundler is a tool created by Carl Lerche, Yehuda Katz, André Arko and various superb ...
Hibernate基础:annotation(hibernatebasic:annotation)
使用HIBERNATE,面临一个问题:  pojo, xml , 数据库表,三个东西的内容都是一致的。最笨的办法: 人肉一个一个去修改。理想的办法: 修改一个,生成另外2个(我怀念RAILS)。  这就要使用 hibernate annotation了。另外的选择还有xdoclet。不过那是几年前的技术了。不谈。 参考这个文章:http://docs.jboss.org...
Ruby中的罕见变量(rarelyseenvariablesinruby)
今天看到了几个比较罕见的RUBY变量,所以记录下来: ( Today I met the $name variable in Ruby which is rarely seen to me, so I made a memoranda here) $, A global variable, e.g. $codes = [200, 300] @, An instance varia...
建立一个rubygem(howtocreatearubygem)
参考:  http://guides.rubygems.org/make-your-own-gem 1. 假设你的gem名字是 "hola", 就要先建立这样的目录结构。(记得 lib下要有个跟项目同名的rb文件哦) % tree . ├── hola.gemspec └── lib └── hola.rb 2. 编辑 lib/hola.rb 这个文件,让它看起来如...
Grails基础用法(grailsbasicsfornewbies)
1. 安装:  需要下载JDK, GRAILS等文件并设置以下变量: ( setup:  download related files and set the variables )    1.1  JAVA_HOME    1.2  GRAILS_HOME   1.3  PATH ...
关于rubycasclient和singlesignout(aboutruby Cas Clientandsinglesignout)
昨天搭建了ruby cas server, 今天使用了一下,效果良好。   ( I setup my CAS server yesterday, and it's running well)  下面是使用ruby CAS CLIENT的步骤:  (参考:http://sg552.iteye.com/blog/1297538 )  ( below is ...
Sql知识复习(sqltipsreview)
SQL 是我最初接触编程时用到的技术。我仅仅在05年的两个项目中使用过。一个是毕业设计,另一个是帮同学写的毕业设计。o(∩∩)o...哈哈。 ( Raw SQL is the technology that I used in my early programming life. I have used them for 2 applications on 2005) 后来就使用了持久层的技...
为refinery使用blueprintcss(useblueprintcssforyourrefinerycms)
1. 下载 Blue print, 并压缩。 (Download the Blueprint CSS zipball, from : ) Blue print website 2. 解压缩,压缩后的文件夹中,有一个叫blueprint的目录,复制到 refinery 项目中。 (Unzip the file and then copy the related files to your...
最全的rubyrails保留字(rubyrailsreservedwordscomplete)
原文见: http://latheesh.com/2010/02/02/rails-reserved-words/ Rails doesn’t like it if you name your models and columns some of the words that it uses in the framework. This is a ...
一种实现模式:钩子方法(animplementpattern:hookmethod)
我们经常会用到hook 方法(钩子方法). 例如: before, after, ...  比如rails,比如delayed_job中。   ( We have been seen this kind of code everywhere:  before, after... in rails or other libraries such as delaye...
问题与解决方案:rails中的gem也会影响到内存占用(moregemsconsumemorememoriesinrailsapp)
在一个rails 应用中,都会遇到优化的问题。 ( 跟java不太一样。呵呵)   ( every Rails app will meet the performance optimization problems when or before it is being delivered.  -- which is not the same with JAVA, as f...
对ruby几个版本的测试(performancetestforseverialrubys)
前几天看到这个文章: http://inosin.iteye.com/blog/1740633 以及robbin的微博,说道更换RUBY PATCH 之后带来的性能100%提升,我打算在自己的项目中实际测试一下。   不仅仅是跑 $rake routes, 我要跑遍所有的 test case, 这样更有代表性。  ( several days ago ...
前几天被一个动态规划的题目难倒了。。。(adynamicprogramquestion:triangle.)
参考:http://poj.org/problem?id=1163 做为一个WEB开发的人,我表示对数据结构一无所知,一塌糊涂,忘的一光二净,看题时一头雾水,解题时异想天开。所以。。。同学们不必看了。。。写在这里,就不往github上放了。。。 有个题目:给出一个树状结构:         ...
从ruby1.8转移到1.9之后的rspec用法变化(rspecusagechangesfromruby1.8toruby1.9)
in ruby 1.8, we use: $ rspec spec however, in 1.9 , we have to specify the current path, e.g. $ rspec spec -I .     more refer to :  http://stackoverflow.com/questions/11376718/requi...
如何入门nodejs?(what'sthetutorialfornodejs?)
update 2018-02-06:  come to these links : ( thanks Daniel ) https://generalassemb.ly/coding/full-stack-web-development - list of courses including details on learning Javascript http://w...