- 浏览: 112898 次
- 性别:
- 来自: 南京
-
最新评论
文章列表
Assume you have a params array with the following items:
params[:qry][:name] = ‘jo’
params[:qry][:city] = ”
You would like to build a new URL with the current params appended. Should be as simple as:
url_for( :action => ‘list’, :params => params.merge( { :sort => key, :page => nil } ) ...
# Replace sensitive parameter data from the request log.
# Filters parameters that have any of the arguments as a substring.
# Looks in all subhashes of the param hash for keys to filter.
# If a block is given, each key and value of the parameter hash and all
# subhashes is pa ...
match(element, first?) => array or nil
Matches an element against the selector.
For a simple selector this method returns an array with the element if the element matches, nil otherwise.
For a complex selector (sibling and descendant) this method returns an array with all matching elements, nil ...
Good afternoon. It is a great honor for me to be here in Shanghai, and to have this opportunity to speak with all of you. I'd like to thank Fudan University's President Yang for his hospitality and his gracious welcome. I'd also like to thank our outstanding Ambassador, Jon Huntsman, who exemplifies ...
在一张图片上,一个在地震中痛失妻子的男子饱含深情,不忍将亡妻弃之野外,将其身体与自己绑在一起,用摩托车载着她前往当地的太平间。在极大悲痛的折磨中,他努力要给妻子些许死后的尊严。英国媒体称,这是大毁灭后存在的人性象征。无数网友为这个男子的举动感动落泪。有网友对他的一往情深感佩至深而赋诗,“娶妻入门背进门,同命相怜送君尘。欲哭无泪心流血,单车无助送归程。”(来源:北京晚报)
大地震过去一个多月了,吴家方还是反复做一个梦,梦见把妻子石华琼紧紧绑在自己背上,发动了摩托车。他一次次在梦中醒来,凄冷月光下,他看着妻子的新坟,觉得妻子也在看着他。
2008年5月14日,吴家方骑摩托车从汉旺镇把妻子接回家, ...
1932年盛夏的一天,苏州九如巷三号的张公馆门前,来了一位身穿灰色长衫戴近视眼镜的年轻人。这位拜访者叩响了张家的大门,并对开门的门房说明了来意,他此行的目的是要求见张家的三小姐。
张家是苏州的名门贵族。 ...
desc 'Create YAML test fixtures from data in an existing database.
Defaults to development database. Set RAILS_ENV to override.'
task :extract_fixtures => :environment do
sql = "SELECT * FROM %s"
skip_tables = ["schema_info"]
ActiveRecord::Base.establish_connec ...
1 我的源码让猫给吃了
不要寻找借口,从自身找原因
2 软件的熵
一句话:不以善小而不为,勿以恶小而为之.
从初期就要做好规范,不要因为是poc这样的前提而放松对代码的规范,现在的项目就
有这种问题,初期的时候有人认为(自己也有这种想法)等到以后正式开发的时候再规范
,而往往还未到正式开发,到处出现不规范的东西.加上拷贝粘贴的大法,亡羊补牢都晚
了.这就是所谓破窗户理论.
3 石头汤与煮青蛙
两个方面,一还是'软件的熵'当中的含义,喜欢书里面的这段话:'大多数的项目的拖
延都是一天一天发生的,系统一个特性一个特性的偏离其规范.一个又一个的 ...
- 2009-12-06 20:14
- 浏览 892
- 评论(0)
那一年,我年届重九,她芳龄二八。都是高三,我们同班。
这样的年纪都是做梦的年纪,这样的年级却是噩梦的年级。我们在如花的年纪准备应对残酷的高考,未来怎么样大家无法预知。我们学校是省重点高中,我当时常能考 ...
- 2009-12-06 15:34
- 浏览 698
- 评论(0)
引用runs each scenario in an isolated DB transaction.
Cucumber::Rails::World
Cucumber::Rails::World is the bridge between Cucumber and
Rails. It provides the Rails integration testing methods within
each scenario.
When Cucumber’s Rails support is loaded by requiring cucum-
ber/rails/world in features/s ...
- 2009-12-05 20:53
- 浏览 887
- 评论(0)
一、创建模式
1. 设计模式之Factory(工厂方法和抽象工厂)
使用工厂模式就象使用new一样频繁.
2. 设计模式之Prototype(原型)
用原型实例指定创建物件的种类,並且通过拷贝这些原型创建新的物件。
3. 设计模式之Buil ...
- 2009-12-05 13:09
- 浏览 827
- 评论(0)
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
double rnd1(double *r) //the definition body of rnd1
{ int m;
double s, u, v, p;
s=65536.0; u=2053.0; v=13849.0;
m=(int)(*r/s); *r=*r-m*s;
*r=u*(*r)+v; m=(int)(*r/s);
*r=*r-m*s; p=*r/s;
ret ...
- 2009-12-05 12:39
- 浏览 909
- 评论(0)
features/manage_resumes.feature:57:5: Parse error, expected one of "|", "\"\"\"", "\n", "\r", "#", "Given", "When", "Then", "And", "But", "@", "Scenario", "Scena ...
- 2009-12-05 11:56
- 浏览 763
- 评论(0)
.css()
• .css('property','value')
• .css({property1: 'value1', 'property-2': 'value2'})
引用Numeric values do not take quotation marks while string values do.
But, when using the map notation, quotation marks are not required for
property names if they are written in camel-cased DOM notation.
.hide() ...
- 2009-11-27 08:58
- 浏览 832
- 评论(0)
.bind() method
This method allows us to specify any JavaScript event, and to attach a behavior to it. In this case, the event is called click, and the behavior is a function consisting of our one-liner above:
$(document).ready(function() {
$('#switcher-normal').bind('click', function() {
$( ...
- 2009-11-26 14:04
- 浏览 1274
- 评论(0)