用perl在多个文件中替换
perl -pi -w -e 's/search/replace/g;' *.cpp
e.g.
perl -pi -w -e 's/.C>/.cpp>/g;' jni/ga/*
21 February, 2012
30 April, 2011
iphone
You are discouraged from overriding
description—if this method fires a fault during a debugging operation, the results may be unpredictable—and initWithEntity:insertIntoManagedObjectContext:. You should typically not override the key-value coding methods such as valueForKey: and setValue:forKeyPath:.04 April, 2011
enable auto spellcheck in Firefox
Type about:config in address bar, enter
Click on "I'll be careful, I promise!",
Type layout.spellcheckDefault on Filter,
Change the default value from 1 to 2.
Click on "I'll be careful, I promise!",
Type layout.spellcheckDefault on Filter,
Change the default value from 1 to 2.
24 March, 2011
javascript event 事件
| 属性 | 当以下情况发生时,出现此事件 | FF | N | IE |
|---|---|---|---|---|
| onabort | 图像加载被中断 | 1 | 3 | 4 |
| onblur | 元素失去焦点 | 1 | 2 | 3 |
| onchange | 用户改变域的内容 | 1 | 2 | 3 |
| onclick | 鼠标点击某个对象 | 1 | 2 | 3 |
| ondblclick | 鼠标双击某个对象 | 1 | 4 | 4 |
| onerror | 当加载文档或图像时发生某个错误 | 1 | 3 | 4 |
| onfocus | 元素获得焦点 | 1 | 2 | 3 |
| onkeydown | 某个键盘的键被按下 | 1 | 4 | 3 |
| onkeypress | 某个键盘的键被按下或按住 | 1 | 4 | 3 |
| onkeyup | 某个键盘的键被松开 | 1 | 4 | 3 |
| onload | 某个页面或图像被完成加载 | 1 | 2 | 3 |
| onmousedown | 某个鼠标按键被按下 | 1 | 4 | 4 |
| onmousemove | 鼠标被移动 | 1 | 6 | 3 |
| onmouseout | 鼠标从某元素移开 | 1 | 4 | 4 |
| onmouseover | 鼠标被移到某元素之上 | 1 | 2 | 3 |
| onmouseup | 某个鼠标按键被松开 | 1 | 4 | 4 |
| onreset | 重置按钮被点击 | 1 | 3 | 4 |
| onresize | 窗口或框架被调整尺寸 | 1 | 4 | 4 |
| onselect | 文本被选定 | 1 | 2 | 3 |
| onsubmit | 提交按钮被点击 | 1 | 2 | 3 |
| onunload | 用户退出页面 | 1 | 2 | 3 |
origin: http://www.w3school.com.cn/js/jsref_events.asp
java String[], array of String
in java one can return multi variables by return an array of String, String[]
public String[] foo(){
String[] resultSrtArr = new String[2];
resultStrArr[0] = Integer.toString( 321 );
resultStrArr[1] = "result";
return resultSrtArr;
}
public toCallFoo(){
String[] resultSrtArr = foo();
int a = Integer.parseInt( resultStrArr[0].trim() );
String str = resultStrArr[1];
}
10 March, 2011
Subscribe to:
Posts (Atom)