存档

‘Reproduced’ 分类的存档

Linux kernel Magic SysRq Key

2010年11月27日 1,355 阅读 没有评论

Kernel Panic了就有用了

The magic SysRq key is a key combination in the Linux kernel which allows the user to perform various low level commands regardless[......]

Read more

HTML的Cache-control详解【转载】

2010年11月23日 1,746 阅读 没有评论

网页的缓存是由HTTP消息头中的“Cache-control”来控制的,常见的取值有private、no-cache、max-age、must-revalidate等,默认为private。其作用根据不同的重新浏览方式分为以下几种情况:
(1) 打开新窗口
如果指定cache-control的值[......]

Read more

Python的print格式化输出还支持‘字符串’精度控制

2010年10月30日 1,845 阅读 6 条评论

1.格式化输出整数

strHello = "the length of (%s) is %d" %('Hello World',len('Hello World'))
print strHello
#输出果:the length of (Hello World) is 11[......]

Read more

Python实现的Google simhash算法

2010年10月30日 1,930 阅读 1 条评论
#!/usr/bin/env python
# -*- coding=utf-8 -*-

# Implementation of Charikar simhashes in Python
# See: http://dsrg.mff.cuni.cz/~holub/sw/shash/#a1[......]

Read more

python版汉字转拼音脚本【转】

2010年10月18日 2,120 阅读 2 条评论

实际上是字典举穷,把汉字码表和拼音对应起来了

#!/usr/bin/env python
# encoding: utf-8
"""
Created by Eric Lo on 2010-05-20.
Copyright (c) 2010 __lxneng[......]

Read more

分类: Pyhton, Reproduced 标签: , , ,

配置Windows下Python2.6的MySQL数据库驱动MySQLdb for Python

2010年10月13日 1,542 阅读 没有评论

官方网站 http://sourceforge.net/projects/mysql-python/ 目前只有py2.5的py2.6的有人打包了

网上流传的很广的帖子是这样的,到这里

http://sourceforge.net/forum/forum.php?thread_id=2[......]

Read more

【转载】Linux生产服务器Shell脚本分享

2010年10月10日 1,993 阅读 1 条评论

作为一名Linux/unix系统管理员,我经常遇到人问这个问题:shell能做什么?PHP这么强大,为什么不用PHP来完成工作呢?其实相对于PHP这些开发语言而言,shell主要用于数据库备份(SVN备份)、计划任务(crontab)、服务状态监控、FTP远程备份等。对于这些任务,shell的强大是[......]

Read more

【转载】PHP的日期时间函数date()整理

2010年10月8日 1,062 阅读 没有评论

1.年-月-日

echo date('Y-m-j');
2007-02-6

echo date('y-n-j');
07-2-6

大写Y表示年四位数字,而小写y表示年的两位数字;
小写m表示月份的数字(带前导),而小写n则表示不带前导的月份数字。

echo date('Y-[......]

Read more

分类: PHP Note, Reproduced 标签: , , ,

ImageFlow图片轮播效果

2010年9月22日 1,653 阅读 没有评论

提取自meegozone

Image 2Image 3Image 6Image 4Image 5

提示:你可以先修改部分代码再运行。

央视”未来广告”的图片轮播(Flash+XML)

2010年9月20日 2,806 阅读 3 条评论

找了好多,这个是基于XML的,比较新颖

<?xml version="1.0" encoding="utf-8"?>
<GamePackBrand>

		<brand id='1'><brandtitle[......]

Read more