2009年4月29日星期三

Google搜索技巧

搜Mp3
?intitle:index.of? mp3 歌手名

搜动画
?intitle:index.of? swf
其他类推

"parent directory " /appz/ -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

"parent directory " DVDRip -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

"parent directory "Xvid -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

"parent directory " Gamez -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

"parent directory " MP3 -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

"parent directory " Name of Singer or album -xxx -html -htm -php -shtml -opendivx -md5 -md5sums

Notice that i am only changing the word after the parent directory, change it to what you want and you will get a lot of stuff.

mess with the best,die like the rest

据说是美国海军陆战队的口号.
mess with -- 干涉
the best -- (自称)
mess with the best -- 敢与老子作对
die like the rest -- 死无葬身之地(跟他们一样下场)
完整的全文应该是: If you mess with the best, you will die like the rest.
//以上解释, 不敢肯定. 最好有上下文, 或者请教权威出处.

其他翻译有:
与强者同行,无惧生死。
要做事,就找最优秀的一起干;要死,也一定要选择从容的离开。
跟我叫板,你死定了。
顺我者昌,逆我者亡。

尚无法确定真确的意思和用法.

2009年4月27日星期一

修改默认的HTTP Response Header

黑客通常通过获取一个HTTP Response,然后解析出HTTP Response Header来知道对方用的是什么web 服务器软件,如下:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Thu, 07 Jul 2005 13:08:16 GMT
Content-Length: 1270
对于IIS来说有一个工具(URLScan)可以用来修改这个HTTP Response Header,让黑客得到假的Header信息,URLScan的地址:http://learn.iis.net/page.aspx/473/using-urlscan

对于Tomcat,Header一般会暴露如下信息:
Server: Apache-Coyote/1.1
修改是在conf/server.xml,在Connector 元素中设置server属性即可。如下:


对于apache呢?
只要在httpd.conf中配上如下两个参数:

ServerSignature Off

ServerTokens Prod

2009年4月26日星期日

Go figure

Example 1:Ironically, when asked about improvement, both parties indicated
that they thought communication should be more intense. Go figure!

Example 2: The prepositions are strangely the last thing almost all the children learn in a language. Go figure!

Example 3: Women and children are the first targets of war. Go figure.

Example 4: Go figure: Weight loss is one of the worst reasons for exercise.

Now, if your definitions of "go figure" run along the lines of "wow, isn't that right?" or "who'd have thought?" or "how come", they're all correct.

Think of "go figure" as short for "go and figure it out for yourself". It is used more like an exclamation, though, punctuating an unexpected fact. Oh yeah, that's right.

2009年4月25日星期六

大事记-中国海军60周年最大规模海上阅兵

2009年4月23日,一场展示各国海军共同构建和谐海洋决心的海上大阅兵,在青岛附近的黄海海域展开。这是中国第一次举办多国海军检阅活动,也是中国海军历史上最大规模的海上阅兵,来自14个国家的21艘舰艇同时接受检阅。胡锦涛主席亲临检阅。

14时20分,《分列式进行曲》的激昂旋律在“石家庄”号阅兵舰上响起。阅兵舰舰艏左前方,由25艘潜艇、驱逐舰、护卫舰和导弹快艇组成的中国海军受阅舰艇编队劈波而来。

首先接受检阅的是“长征6”号核动力潜艇。在它的带领下,曾创造潜行时间最长世界纪录的“长征3”号核动力潜艇和“长城218”号、“长城177”号常规动力潜艇以水面航行状态逐一通过阅兵舰。

新华社

海上阅兵原定上午9:00开始,并且由CCTV直播,但是忽然推迟到下午2:00开始,直播也被取消,上午胡主席进行了会见29国海军代表团团长活动。

4月23日上午,国家主席、中央军委主席胡锦涛在青岛会见应邀前来参加中国人民解放军海军成立60周年庆典活动的29国海军代表团团长,代表中国政府和军队向参加庆典活动的各国海军官兵表示热烈欢迎。 新华社记者王建民摄

4月23日下午,中共中央总书记、国家主席、中央军委主席胡锦涛在青岛出席庆祝人民海军成立60周年海上阅兵活动。这是胡锦涛主席热情地向受阅舰艇官兵挥手致意。新华社记者王建民摄

4月24日晚,在庆祝中国人民解放军海军成立60周年之际,中共中央总书记、国家主席、中央军委主席胡锦涛在北京亲切会见海军老同志和英模代表。这是胡锦涛和战斗英雄麦贤得亲切握手交谈。新华社记者 查春明 摄



http://news.ifeng.com/mil/special/haijun60years/

throw on相关词组和用法

throw on
v.匆匆穿上
eg: You jump out of bed, throw on a baseball cap and some clothes, and rush down to your workplace.

throw on the defensive (迫使采取守势)
throw one's bread upon the waters (v. 行善)
throw one's hat in the ring ( v. 宣布加入战斗)
throw one's sword into the scale (v. 用武力解决)
throw one's weight about (v. 仗势欺人)
throw oneself on (v.依赖)
throw oneself upon the country (要求陪审团审判)
throw oneself at (v.向...猛扑过去, 拼命讨好)

2009年4月22日星期三

甲骨文74亿美元收购Sun

甲骨文周一(09-4-20)宣布,将以每股9.5美元的价格收购Sun,这一价格比Sun上周五收盘价高出了42%。包括Sun的现金和债务在内,该交易的价值为74亿美元。

如果此次交易顺利达成,则Sun将成为甲骨文自2005年1月以来的第52个收购对象。其中最大的几次并购分别是:2005年初,甲骨文以103亿美元收购全球第二大客户关系管理软件厂家仁科(PeopleSoft);2007年以33亿美元收购商业情报软件厂家海波龙(Hyperion);2008年初,以85亿美元收购中间件巨头BEA。

而甲骨文的收入也迅速膨胀。2004财年甲骨文总收入102亿美元,实现净利润27亿美元,2008财年总收入224亿美元,实现净利润55亿美元。

Sun今年1月份发布第二财季财报时表示,软件业务营收增长了21%,增幅似乎不小,但软件业务年营收仅为6亿美元。分析师预计今年Sun营收将达到124亿美元。Sun从本质上来说是一家硬件公司,这也是分析师预计其本财年将会亏损的原因。Sun各项业务并入甲骨文后,甲骨文将有能力向全球企业用户提供包括硬件、软件和技术支持在内的一店式整体解决方案。

立此存照。

Lenny中用LVM调整磁盘卷大小

最近报/root分区磁盘不足,有幸是在安装系统时采用了LVM,否则问题就难解决了。
最初的分区:


现在要压缩myserver-home ,增加myserver-root。

查看物理卷
#pvdisplay
略……

查看卷组
#vgdisplay
略……

查看逻辑卷
#lvdisplay
--- Logical volume ---
LV Name /dev/myserver/root
VG Name myserver
LV UUID g8bztp-lrp3-XGhk-O6PB-ctZn-Yl5M-Dr247z
LV Write Access read/write
LV Status available
# open 1
LV Size 6.52 GB
Current LE 1668
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

--- Logical volume ---
LV Name /dev/myserver/swap_1
VG Name myserver
LV UUID fsoPym-loXw-NfQW-3Uff-jMtM-1N1q-NGwSIr
LV Write Access read/write
LV Status available
# open 1
LV Size 5.63 GB
Current LE 1441
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1

--- Logical volume ---
LV Name /dev/myserver/home
VG Name myserver
LV UUID 2fdbfk-sc9H-bKHn-Po5s-8q38-67Di-lFKZXz
LV Write Access read/write
LV Status available
# open 1
LV Size 293.00 GB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:2


确定要变更的两个逻辑卷名:
/dev/myserver/home 挂载点是 /home
/dev/myserver/root 挂载点是 /

(一)减少/dev/myserver/home

#umount /home

#mke2fs -n /dev/myserver/home
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
18563072 inodes, 74249216 blocks
3712460 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2266 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616

执行这个命令是要计算调整块的最终大小。我要将/dev/myserver/home减少到50G,而将腾出的空间给/dev/myserver/root.
上面的数据显示,每块大小为4096Bytes ,总共有74249216块。
50G=53687091200 Bytes =13107200 blocks
减少的块数=74249216 - 13107200=61142016
减少的61142016块= 238836M

#resize2fs -f /dev/myserver/home 13107200
#lvreduce -L-238836M /dev/myserver/home
#mount /home

检查是否减少了
#df -lh


(二)扩展/dev/myserver/root 的大小

#lvextend -L+238836M /dev/myserver/root
注意,这里在其他某些linux系统本可以执行ext2online 来实现,但是Lenny中没有这个命令,本应该用
# umount /dev/myserver/root
# resize2fs /dev/myserver/root
# mount /dev/myserver/root /
但是因为 /dev/myserver/root在使用中,无法执行umount ,所以直接执行如下命令即可:

#resize2fs /dev/myserver/root

检查是否增加了
#df -lh

完毕!

参考:
http://www.ownlinux.cn/2009/03/26/debian-linux-lvm/
lvm(逻辑卷管理器)的介绍和常用功能流程实验
LVM使用手册

2009年4月20日星期一

Locard's Exchange Principle

On a live system, changes will occur simply due to the passage of time, as processes work, as data is saved and deleted, as network connections time out or are created, and so on. Some changes happen when the system just sits there and runs. Changes also occur as the investigator
runs programs on the system to collect information, volatile or otherwise. Running a program causes information to be loaded into physical memory, and in doing so, physical memory used by other, already running processes may be written to the page file. As the investigator collects information and sends it off the system, new network connections will be created. All these changes can be collectively explained by Locard’s Exchange Principle.

In the early 20th century, Dr. Edmond Locard’s work in the area of forensic science
and crime scene reconstruction became known as Locard’s Exchange Principle.
This principle states, in essence, that when two objects come into contact, material is
exchanged or transferred between them. If you watch the popular CSI crime show
on TV, you’ll invariably hear one of the crime scene investigators refer to possible
transfer.This usually occurs after a car hits something or when an investigator examines
a body and locates material that seems out of place.

Edmond Locard (1877–1966) studied law at the Institute of Legal Medicine and worked subsequently as an assistant to the forensic pioneer Alexandre Lacassagne prior to directing the forensic laboratory in Lyon, France. Locard's techniques proved useful to the French Secret Service during World War I (1914–1918), when Locard was able to determine where soldiers and prisoners had died by examining the stains on their uniforms.

Like Hans Gross and Alphonse Bertillon before him, Locard advocated the application of scientific methods and logic to criminal investigation and identification. Locard's work formed the basis for what is widely regarded as a cornerstone of the forensic sciences, Locard's Exchange Principle, which states that with contact between two items, there will be an exchange. It was Locard's assertion that when any person comes into contact with an object or another person, a cross-transfer of physical evidence occurs. By recognizing, documenting, and examining the nature and extent of this evidentiary exchange, Locard observed that criminals could be associated with particular locations, items of evidence, and victims. The detection of the exchanged materials is interpreted to mean that the two objects were in contact. This is the cause and effect principle reversed; the effect is observed and the cause is concluded.

Crime reconstruction involves examining the available physical evidence, those materials left at or removed from the scene, victim, or offender, for example hairs, fibers, and soil, as well as fingerprints, footprints, genetic markers (DNA), or handwriting. These forensically established contacts are then considered in light of available and reliable witness, the victim, and a suspect's statements. From this, theories regarding the circumstances of the crime can be generated and falsified by logically applying the information of the established facts of the case.

Locard's publications make no mention of an "exchange principle," although he did make the observation "Il est impossible au malfaiteur d'agir avec l'intensité que suppose l'action criminelle sans laisser des traces de son passage." (It is impossible for a criminal to act, especially considering the intensity of a crime, without leaving traces of this presence.). The term "principle of exchange" first appears in Police and Crime-Detection, in 1940, and was adapted from Locard's observations.

source:http://www.enotes.com/forensic-science/locard-s-exchange-principle


2009年4月19日星期日

排列组合

分 类 计 数 原 理
做一件事,完成它有n类不同的办法。第一类办法中有m1种方法,第二类办法中有m2种方法……,第n类办法中有mn种方法,则完成这件事共有:N=m1+m2+…+mn种方法。

分 步 计 数 原理
做一件事,完成它需要分成n个步骤。第一步中有m1种方法,第二步中有m2种方法……,第n步中有mn种方法,则完成这件事共有:N=m1 m2 … mn种方法。

处理实际问题时,要善于区分是用分类计数原理还是分步计数原理,这两个原理的标志是“分类”还是“分步骤”。

排列 :从n个不同的元素中取m(m≤n)个元素,按照一定的顺序排成一排,叫做从n个不同的元素中取m个元素的排列。
组合:从n个不同的元素中,任取m(m≤n)个元素并成一组,叫做从n个不同的元素中取m个元素的组合。

排列数:从n个不同的元素中取m(m≤n)个元素的所有排列的个数,叫做从n个不同元素中取出m个元素的排列数,记为Pnm
组合数:从n个不同的元素中取m(m≤n)个元素的所有组合的个数,叫做从n个不同元素中取出m个元素的组合数,记为Cnm

选排列数


全排列数


组合公式


二项式定理

(1)项数:n+1项
(2)指数:各项中的a的指数由n起依次减少1,直至0为止;b的指数从0起依次增加1,直至n为止。而每项中a与b的指数之和均等于n 。
(3)二项式系数:二项式系数具有对称性,与两端等离的两项的二项式系数相等。

二项展开式的性质