This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery | |
| 1.特点: | |
| 小巧 | |
| 功能强 | |
| 跨浏览器 | |
| 插件 | |
| 2.使用 | |
| 实际是js文件 | |
| a) 复制js到WebRoot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> c.errors.add_on_blank('instructor','not be blank') | |
| => ["instructor"] | |
| >> c.errors | |
| => #<ActiveRecord::Errors:0xb01f150c @errors={"instructor"=>["not be blank"]}, @base=#<Conversation id: "3e7f4481-e96b-012d-7fdc-042b2b5ce4fb", state: 10, tag: "20101214-2-00022", title: "死亡索赔", aim: 1, emergency: 1, security: 1, kind_id: 1, content: "当事人利爱琼称有29人来我厂索赔,事�...", record_id: nil, district: "440310008000", ownerdistrict: "440310008000", sub_kind_id: 199, place: "坑梓", source: 3, reportor_id: "3e7f4480-e96b-012d-7fdc-042b2b5ce4fb", reported_at: "2010-12-14 12:46:00", levels: 2, finishdate: "2011-01-27 00:00:00", advice: "请司法所处理,并将处理结果于15个工作...", remark: nil, flag: 1, creator_id: "57ec3557-c4dc-4ac8-87a6-a13ad4104686", modifier_id: "57ec3557-c4dc-4ac8-87a6-a13ad4104686", dispatched_at: "2010-12-16 18:29:35", finished_at: nil, created_at: "2010-12-14 12:47:57", updated_at: "2010-12-31 17:59:31", count: nil, grid_id: nil, building_id: nil, warndate: "2011-01-25 00:00:00", dealdistrict: "440310008000", instruct: "同意拟办意见." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> c.errors.add_on_blank('instructor','not be blank') | |
| => ["instructor"] | |
| >> c.errors | |
| => #<ActiveRecord::Errors:0xb01f150c @errors={"instructor"=>["not be blank"]}, @base=#<Conversation id: "3e7f4481-e96b-012d-7fdc-042b2b5ce4fb", state: 10, tag: "20101214-2-00022", title: "死亡索赔", aim: 1, emergency: 1, security: 1, kind_id: 1, content: "当事人利爱琼称有29人来我厂索赔,事�...", record_id: nil, district: "440310008000", ownerdistrict: "440310008000", sub_kind_id: 199, place: "坑梓", source: 3, reportor_id: "3e7f4480-e96b-012d-7fdc-042b2b5ce4fb", reported_at: "2010-12-14 12:46:00", levels: 2, finishdate: "2011-01-27 00:00:00", advice: "请司法所处理,并将处理结果于15个工作...", remark: nil, flag: 1, creator_id: "57ec3557-c4dc-4ac8-87a6-a13ad4104686", modifier_id: "57ec3557-c4dc-4ac8-87a6-a13ad4104686", dispatched_at: "2010-12-16 18:29:35", finished_at: nil, created_at: "2010-12-14 12:47:57", updated_at: "2010-12-31 17:59:31", count: nil, grid_id: nil, building_id: nil, warndate: "2011-01-25 00:00:00", dealdistrict: "440310008000", instruct: "同意拟办意见." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // remove crappy contents from news.google.de | |
| $("div.source, span.source").filter(function() { return /(BILD|WELT ONLINE)/.test( $(this).text() ) }).parent().fadeOut(); | |
| $("h2.title > a").filter(function() { return /.*(welt.de|bild.de).*/.test( $(this).attr('href') ) } ).parents("div.story").fadeOut(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 可用request.query_string获取页面中传过来的所有params参数,例如: | |
| "#{export_excel_path(:from=>'aaa')&#{request.query_string}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git reset --hard <old-commit-id> | |
| git push -f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if RUBY_VERSION =~ /1.9/ | |
| Encoding.default_external = Encoding::UTF_8 | |
| Encoding.default_internal = Encoding::UTF_8 | |
| end | |
| [2010-12-16 20:23:45] ERROR ArgumentError: invalid byte sequence in US-ASCII |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| d=`date +%Y-%m-%d` | |
| echo $d | |
| vim ./_posts/${d}-$1.textile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.ibm.com/developerworks/cn/java/j-cb08016/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :6,35 s/s/S/g 替换6到35行 |