发表于: sitebuild | 作者: | 日期: 2008/11/14 11:11









评论关闭
发表于: os/software | 作者: | 日期: 2008/11/14 11:11
标签:
F1 显示当前程序或者windows的帮助内容。
F2 当你选中一个文件的话,这意味着”重命名”
F3 当你在桌面上的时候是打开”查找:所有文件”对话框

F10或ALT 激活当前程序的菜单栏
windows键或CTRL+ESC 打开开始菜单
CTRL+ALT+DELETE 打开任务管理器
DELETE 删除被选择的选择项目,如果是文件,将被放入回收站
SHIFT+DELETE 删除被选择的选择项目,如果是文件,将被直接删除而不是放入回收站
CTRL+INSERT或CTRL+C 复制被选择的项目到剪贴板
SHIFT+INSERT或CTRL+V 粘贴剪贴板中的内容到当前位置
ALT+BACKSPACE或CTRL+Z 撤销上一步的操作
ALT+SHIFT+BACKSPACE 重做上一步被撤销的操作
Windows键+M 最小化所有被打开的窗口。
SHIFT+ WINDOWS+ M 撤消最小化所有窗口。
Windows键+CTRL+M 重新将恢复上一项操作前窗口的大小和位置
Windows键+E 打开资源管理器
Windows键+F 打开”查找:所有文件”对话框
Windows键+R 打开”运行”对话框
Windows键+BREAK 打开”系统属性”对话框
Windows键+CTRL+F 打开”查找:计算机”对话框
SHIFT+F10或鼠标右击 打开当前活动项目的快捷菜单
ALT+F4 关闭当前应用程序
ALT+SPACEBAR 打开程序最左上角的菜单
ALT+TAB 切换当前程序
ALT+ESC 切换当前程序
ALT+ENTER 将windows下运行的MSDOS窗口在窗口和全屏幕状态间切换
PRINT SCREEN 将当前屏幕以图象方式拷贝到剪贴板
ALT+PRINT SCREEN 将当前活动程序窗口以图象方式拷贝到剪贴板
CTRL+F4 关闭当前应用程序中的当前文本(如word中)
CTRL+F6 切换到当前应用程序中的下一个文本(加shift可以跳到前一个窗口)
评论关闭
发表于: sitebuild | 作者: | 日期: 2008/11/14 10:11




aaaa asdfffffffffffffdddddddddd aaa
bbbb xxxx bbbb



word-wrap属性仅作用于有布局的对象,如块对象。内联要素要使用该属性,必须先设定对象的 height 或 width 属性,或者设定 position 属性为 absolute ,或者设定 display 属性为 block 。

评论关闭
发表于: sitebuild | 作者: | 日期: 2008/11/11 01:11
标签:

总结了URL最大长度限制的相关知识。 More …

评论关闭
发表于: os/software | 作者: | 日期: 2008/11/11 12:11
标签:

在UE中使用如下方式进行替换
查找 :^r^n
替换为:你准备替换的字符串

在Emeditor中使用如下方式进行替换
查找:\r\n
替换为:你准备替换的字符串

两者都需要选中“使用正则表达式”

评论关闭
发表于: lnmp | 作者: | 日期: 2008/11/11 10:11
标签:

###############################

1.交换两个字符位置

xp
2.上下两行调换
ddp More …

评论关闭
发表于: lnmp | 作者: | 日期: 2008/11/11 10:11
标签:

#######################

vi 使用详解

(一)进入和退出vi

进入:shell模式下,输入vi filename或直接vi。

退出:command模式下。

退出不保存文件(用户未改变文件) :q

强行退出不保存文件 :q!

退出并保存文件 :wq 或 :x 或

退出并强行保存(针对只读文件) :wq!

(二)命令模式与编辑模式切换

shell模式下输入vi filename直接进入command mode

command mode下,按”Insert” or “i” or “I” or “a” or “A”键进入edit mode

edit mode下ESC按键进入command mode

(三)
编辑指令(command mode下起作用)

光标移动: 上下左右分别为k j h l键 (有时候系统不支持标准键盘的方向键)

w或W 光标移至下一个词的开头

b或B 光标移至上一个词的开头

e或E 光标移至下一个词尾

H 光标移至该屏屏首

M 光标移至该屏中间一行行首

L 光标移至该屏屏尾

屏幕前滚

屏幕后滚

1G 光标移至文件首行开头

20G 光标移至文件第20行开头

G 光标移至文件末行开头

文本编辑:

a 在光标后加字

A 在行尾加字

i 在光标处加字

I 在行首加字

x 删除光标处的字符

dw 删除光标位置到词尾的所有字符

d$ 删除光标位置到行尾的所有字符

d0 删除光标位置到行首的所有字符

dd 剪切整行

10dd 剪切从当前起向下十行

yy 复制当前行

p 粘贴

:10,50d 删除第10到第50行

u 撤销操作(只能撤销一次)

/字符或字符串+ 从当前位置向下查找 按n显示下一个匹配结果

?字符或字符串+ 从当前位置向上查找 按n显示下一个匹配结果

:g/ 字符或字符串1 /s// 字符或字符串2 /g 在全文用字符或字符串2替换字符或字符串1

o 插入一行

:!command 在下执行系统指令并返回vi (如:!ls)

评论关闭
发表于: sitebuild | 作者: | 日期: 2008/11/11 09:11

stringObject.replace(findstring,newstring)

The replace() method returns the string that results when you replace text matching its first argument (a regular expression) with the text of the second argument (a string). If the g (global) flag is not set in the regular expression declaration, this method replaces only the first occurrence of the pattern.

参数说明
findstring 目标字符串
Required. Specifies a string value to find. To perform a global search add a ‘g’ flag to this parameter and to perform a case-insensitive search add an ‘i’ flag
必选项。指定所要替换的字符串。要执行多次匹配需要添加一个”g“标记。要指定模糊匹配需要添加一个”i“标记

newstring 新字符串
Required. Specifies the string to replace the found value from findstring
必选项。指定所要替换的字符串的新值

全部替换可参考如下实现:

1
var testStr = “aaabbbcccdddaaa”;
alert(testStr.replace(/a/g,’x’));
将字符串testStr中的所有a全部替换成x

2
stringObj.replace(new RegExp(oldString,”gm”),newString))
说明:
gm的g表示global, m表示multiLine,可以实现替换全部指定字串。

3
var testStr = “aaabbbcccdddaaa”;
str=str.split(“a”).join(“x”);
alert(str) ;
将字符串testStr中的所有a多替换成x

参考文档:http://wangyi878750.blog.sohu.com/31370032.html

评论关闭
发表于: java/j2ee | 作者: | 日期: 2008/11/11 06:11
标签: ,

java中URL 的编码和解码函数
java.net.URLEncoder.encode(String s)和java.net.URLDecoder.decode(String s);

评论关闭

escape() 方法
JavaScript中escape函数是对 String 对象编码以便它们能在所有计算机上可读,使用方法:

escape(charString)

charstring是必选项,参数是要编码的任意 String 对象或文字。

escape 方法返回一个包含了 charstring 内容的字符串值( Unicode 格式)。所有空格、标点、重音符号以及其他非 ASCII 字符都用 %xx 编码代替,其中 xx 等于表示该字符的十六进制数。例如,空格返回的是 “%20” 。字符值大于 255 的以 %uxxxx 格式存储。

注意 escape 方法不能够用来对统一资源标示码 (URI) 进行编码。对其编码应使用 encodeURI 和encodeURIComponent 方法。

英文解释:
MSDN JScript Reference: The escape method returns a string value (in Unicode format) that contains the contents of [the argument]. All spaces, punctuation, accented characters, and any other non-ASCII characters are replaced with %xx encoding, where xx is equivalent to the hexadecimal number representing the character. For example, a space is returned as “%20.”
Edge Core Javascript Guide: The escape and unescape functions let you encode and decode strings. The escape function returns the hexadecimal encoding of an argument in the ISO Latin character set. The unescape function returns the ASCII string for the specified hexadecimal encoding value.

encodeURI() 方法
把URI字符串采用UTF-8编码格式转化成escape格式的字符串。不会被此方法编码的字符:! @ # $& * ( ) = : / ; ? + ‘

英文解释:
MSDN JScript Reference: The encodeURI method returns an encoded URI. If you pass the result to decodeURI, the original string is returned. The encodeURI method does not encode the following characters: “:”, “/”, “;”, and “?”. Use encodeURIComponent to encode these characters.
Edge Core Javascript Guide: Encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, or three escape sequences representing the UTF-8 encoding of the character

encodeURIComponent() 方法
把URI字符串采用UTF-8编码格式转化成escape格式的字符串。与encodeURI()相比,这个方法将对更多的字符进行编码,比如 / 等字符。所以如果字符串里面包含了URI的几个部分的话,不能用这个方法来进行编码,否则 / 字符被编码之后URL将显示错误。不会被此方法编码的字符:! * ( )

英文解释:
MSDN JScript Reference: The encodeURIComponent method returns an encoded URI. If you pass the result to decodeURIComponent, the original string is returned. Because the encodeURIComponent method encodes all characters, be careful if the string represents a path such as /folder1/folder2/default.html. The slash characters will be encoded and will not be valid if sent as a request to a web server. Use the encodeURI method if the string contains more than a single URI component. Mozilla Developer Core Javascript Guide: Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, or three escape sequences representing the UTF-8 encoding of the character.

因此,对于中文字符串来说,如果不希望把字符串编码格式转化成UTF-8格式的(比如原页面和目标页面的charset是一致的时候),只需要使用escape。如果你的页面是GB2312或者其他的编码,而接受参数的页面是UTF-8编码的,就要采用encodeURI或者encodeURIComponent。

另外,encodeURI/encodeURIComponent是在javascript1.5之后引进的,escape则在javascript1.0版本就有。

英文注释:The escape() method does not encode the + character which is interpreted as a space on the server side as well as generated by forms with spaces in their fields. Due to this shortcoming, you should avoid use of escape() whenever possible. The best alternative is usually encodeURIComponent().Use of the encodeURI() method is a bit more specialized than escape() in that it encodes for URIs [REF] as opposed to the querystring, which is part of a URL. Use this method when you need to encode a string to be used for any resource that uses URIs and needs certain characters to remain un-encoded. Note that this method does not encode the ‘ character, as it is a valid character within URIs.Lastly, the encodeURIComponent() method should be used in most cases when encoding a single component of a URI. This method will encode certain chars that would normally be recognized as special chars for URIs so that many components may be included. Note that this method does not encode the ‘ character, as it is a valid character within URIs.

参考:
http://www.ijavascript.cn/shouce/javascript-escape-166.html
http://www.cnblogs.com/winner/archive/2007/08/28/873498.html
http://kuiyuexiang.javaeye.com/blog/177624
http://www.neo.com.tw/archives/000152.html

评论关闭