Under mountain and valley

Posted on 六月 23, 2009
Filed Under 天籁 | Leave a Comment

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.

Google的一份面试题集

Posted on 六月 23, 2009
Filed Under 实用 | Leave a Comment

下面Google的一份面试题集,看看你是否能够回答出来。其中很多问题都是开放式的,正确的解答有许多种,所以发挥你的Creativity and Imagination.

1.一辆学校班车里面能装多少个高尔夫球?

2.你被缩小到只有硬币厚度那么点高(不是压扁,是按比例缩小),然后被扔到一个空的玻璃搅拌器中,搅拌刀片一分钟后就开始转动。你怎么办?

3.要是让你清洗整个西雅图的所有窗子,你会收取多少费用? Read more

晚霞

Posted on 六月 18, 2009
Filed Under 摄影 | 3 Comments

默认安装debian后使用drupal的问题

Posted on 六月 8, 2009
Filed Under Unix, drupal, 实用 | Leave a Comment

在安装完debian,后使用apt-get 工具安装apahce,mysql.php5,安装完drupal后,在使用过程中,遇到一些问题

1.用户注册时接收不到验证邮件。

2.apache没有启用rewrite,不能使用drupal的clean url。

3.uploadprogress没用启用(在传送大文件时的进度条显示)。

4.在debian5下配置php,其extension并不在php.ini中。

解决方法:

1.用户接收不到验证邮件是由于mail()肯定没有发送成功,查阅了一下发现,mail()要使用sendmail.debian默认安装时没有安装sendmail,我使用sudo apt-get install sendmail 不成功,提示包依赖sendmail-bin,但其无法安装,所以改用sudo apt-get install sendmail-bin,安装顺利,重新启动apache后,发面验证邮件可以发出了。

2.第二个问题,前面有提过,只简单使用一个命令,便可搞定

#sudo a2enmod rewrite

重新加载apache2,便可使用clean url了

3.这个问题的解决是参考了http://www.javaems.com/archives/364

来解决,不过在使用程中,下载解压文件后,定位到解压目录

使用phpize发面没有这个命令。

 这个命令是在php-dev中,所以要先安装php-dev

然后使用 phpize,./configure成功,便在make过程中还是出现ERROR make not found.

哈哈,竟然连make 工具都没有安装,debian也太小心眼了。

#sudo apt-get install make

然后make

make install ,这只是安装了,uploadprogress的扩展,要在php的extension中启用。

定位到/etc/php5/conf.d/

#sudo gedit uploadprogress.ini

输入:extension=uploadprogress.so

4.#ls /etc/php5/conf.d

mysql.ini curl.ini等等吧,所以php的extension启用在这里。

备查!!

Google Earth is a Spy

Posted on 六月 3, 2009
Filed Under 生活 | Leave a Comment

Only a picture from Google earth.It’s show the north korea

老小孩们节日快乐

Posted on 六月 1, 2009
Filed Under 生活 | Leave a Comment

长大了

但永远都是孩子 Read more

Installing PECL uploadprogress Extension for Drupal FileField 3.0 Module

Posted on 六月 1, 2009
Filed Under Unix, drupal, 实用 | 1 Comment

搜索找到的方法,备查

FileField and ImageField 3.0 have just been released and bring with them the ability to display an upload progress meter in the FileField widget while a file is being uploaded. As ImageField uses the FileField widget this works for ImageFields too.

The original article FileField and ImageField 3.0 for Drupal 6 Released points out:

Probably the most exciting improvement is the addition of upload progress indication. This enhancement requires the PECL uploadprogress PHP extension, but adds a real asset to sites that use FileField for podcasts, videos, or other large files.

Read more

15个知名的英文tech博客媒体

Posted on 五月 29, 2009
Filed Under 实用 | Leave a Comment

给大家推荐15个知名的英文tech博客媒体,之所以称之为博客媒体而非博客,主要是区分于一般的个人博客,它们大多是以network形式存在,包括多个作者写作,更重要的是它们已经成为一个媒体。

作为一个IT行业的关注者,尤其是一个关注互联网的blogger,及时了解国外互联网行业的走势和热点是非常重要的,比如当下热炒的Web2.0或者是新媒体。

那么把这16个英文tech科技博客媒体加入你的Google Reader是必须的。当然,按照我的订阅经验,这16个博客基本覆盖了所有的热点新闻和观点,而且内容都相当的优质。甚至也如国内经常扎堆报道一个事,好在观点不同,这就是博客媒体区别于传统媒体之处。 Read more

freebsd sysctl.conf配置说明

Posted on 五月 15, 2009
Filed Under Unix, 网络 | Leave a Comment

###################
所有rfc相关的选项都是默认启用的,因此网上的那些还自己写rfc支持的都可以扔掉了:)
###############################

net.inet.ip.sourceroute=0
net.inet.ip.accept_sourceroute=0
#############################
通过源路由,攻击者可以尝试到达内部IP地址 –包括RFC1918中的地址,所以
不接受源路由信息包可以防止你的内部网络被探测。
#################################

net.inet.tcp.drop_synfin=1
###################################
安全参数,编译内核的时候加了options TCP_DROP_SYNFIN才可以用,可以阻止某些OS探测。
##################################

Read more

FreeBSD下IPFW的RED功能

Posted on 五月 13, 2009
Filed Under Unix, 网络 | Leave a Comment

随机早期检测 (RANDOM EARLY DETECTION)

随机早期检测(以下简称RED)是一种拥塞减除算法(也包含一些功能协议)。它的功用是通过保证数据队列不致于排满来避免网络阻塞。它的实现方式是不断地计算队列的长度,并拿它与设定的两个阀值(一个最小值和一个最大值)进行比较。

如果队列平均长度小于最小阀值,那么就不动作,自然也没有数据包会丢失。
如果这个值超过了最大阀值,那么所有新抵达的数据包就会被丢弃。
而如果这个值处于这两者之间(关键在这里),那么RED就会按照由队列长度中得到的一些信息来决定丢弃什么包。

Read more

keep looking »