Home » Archive by Category

Articles in the 网络相关 Category

February 5, 2009100 Vim commands every programmer should know

Author : Kunn | Views : 253 | Comments : 3

Category: 网络相关 | Tages:

Search
/word Search “word” from top to bottom
?word Search “word” from bottom to top
/jo[ha]n Search “john” or “joan”
/< the Search “the”, “theatre” or “then”
/the> Search “the” or “breathe”
/< the> Search “the”
/< ….> Search all words of 4 letters
// Search “fred” but not “alfred” or “frederick”
/fred|joe Search “fred” or “joe”
/ Search exactly 4 digits
/^n{3} Find 3 empty lines
:bufdo /searchstr/ Search in all open files

Replace
:%s/old/new/g Replace all occurences of “old” by “new” in file
:%s/old/new/gw Replace all occurences with confirmation
:2,35s/old/new/g Replace all occurences between lines 2 and 35
:5,$s/old/new/g Replace all occurences from line 5 to EOF
:%s/^/hello/g Replace the begining of each line by “hello”
:%s/$/Harry/g Replace the end of each line by “Harry”
:%s/onward/forward/gi Replace “onward” by “forward” , case unsensitive
:%s/ *$//g Delete all white spaces
:g/string/d Delete all lines containing “string”
:v/string/d Delete all lines containing which didn’t contain “string”
:s/Bill/Steve/ Replace the first occurence of “Bill” by “Steve” in current line
:s/Bill/Steve/g Replace “Bill” by “Steve” in current line
:%s/Bill/Steve/g Replace “Bill” by “Steve” in all the file
:%s/r//g Delete DOS carriage returns (^M)
:%s/r/r/g Transform DOS carriage returns in returns
:%s#< [^>]+>##g Delete HTML tags but keeps text
:%s/^(.*)n1$/1/ Delete lines which appears twice
Ctrl+a Increment number under the cursor
Ctrl+x Decrement number under cursor
ggVGg? Change text to Rot13
Read the rest of this entry »

February 4, 2009Gmail 界面更新

Author : Kunn | Views : 188 | No Comments

Category: 网络相关 | Tages: ,

Gmail Update

Gmail的界面又做了小小的更新,按钮更加精致了,增加了“Move To” 操作,试了下,结果邮件不知道Move到哪里去了….囧一个先~~
还是我Label 习惯啊,哈哈

October 1, 2006备忘

Author : Kunn | Views : 127 | No Comments

Category: 网络相关 | Tages:
<div> 页面排版示意图,不错!

updated at 2006.10.06

March 1, 2006关于版权声明的写法

Author : Kunn | Views : 85 | No Comments

Category: 网络相关 | Tages:
看了不少朋友的个人网站,有一个小问题,似乎很多朋友都忽略了,那就是版权声明的写法。虽然那只是一小行字,不过作为设计师也好,作为个人的爱好也好,版权的标志都是满重要的。

从法律角度看,加入了伯尔尼公约的国家,版权保护是随着作品(无论是文字,还是图片)的问世的即刻就得到版权的保护的,并不是必须要声明。但是作为惯例,这一小行文字还是有很好加强意识,提醒浏览者,所观看的内容是受到版权保护的。

正确的格式应该是:Copyright [dates] by [author/owner]

© 通常可以代替Copyright,但是不可以用(c)。 All Rights Reserved 在某些国家曾经是必须的,但是现在在大多数国家,都不是法律上必须有的字样。

参见下面几个正确的格式:

©1995-2004 Macromedia, Inc. All rights reserved.

©2004 Microsoft Corporation. All rights reserved.

Copyright © 2004 Adobe Systems Incorporated. All rights reserved.

©1995-2004 Eric A. and Kathryn S. Meyer. All Rights Reserved.

请注意标点符号和大小写的用法,这也是专业精神的一种体现。

现在流行some rights reserved:creativecommons.org

some rights reserved 和copyright 本身并不矛盾,但是其中的界限更多是一个道德问题,真正的保留一部分权力,是指给浏览者fair use 的权利,fair use的界定也决不是随便乱用,或者抄袭。

甚至说,除了copyright,还有copyleft,它的定义是为了程序员开发能够共享源代码的一个方式,英文里free, 并不仅仅是免费。而且这种的源码公开免费使用,和版权也一点都不冲突。请大家不要误解。

对于从网上下载素材,如音乐、图片等版权问题,有朋友问这个问题,答案很简单,所有的这些都有版权问题。和这些作品的大小格式没有关系。

这也是为什么经典论坛不讨论下载的原因,包含字体,同时经典网站也希望其他的网站能尊重本站作者的版权。

版权是互相的,因为每个人都在随时的拥有着你所刚刚创造的作品的版权,哪怕你的涂鸦之作已经被丢进垃圾桶,严格意义上,那也不可以被人抄袭的。不然公司就不需要碎纸机了。

只有彼此的尊重,互相的尊重才能有真正意义上的共享,简单的拿来主义,或者因为我是经典的用户,所以别人就必须要尊重经典的版权,而我不必尊重别人的版权,是不会形成好的版权保护意识的。

版权其实并不意味着付费,和商业化也没有直接的关联。很多时候,你如果真想使用版权保护的内容,只要发封邮件,询问一下许可就可以, 大多数的情形下,个人用户是很喜欢甚至欣赏这样的礼貌和尊重的。

版权问题中很多的灰色地带,我想与其总是用法律的角度来要求用户,还不如让我们都从自己的道德来判断,从尊重的角度来取舍。