Skip to content

Category Archives: 技术感想

业余设计作品(1)

最近闲来没事,帮一个公司设计一个产品展示网站, 但是实际证明,设计真的不是我的强项。
最终的网站成型: www.petitavril.com

SEO参考

有大量关于标签、定向、站点地图语法、robots.txt 语法等等的信息。以小手册的形式给出了大量有用的信息。SEO 工作者必备。

PHOTOSHOP快捷键(PC)

简明列出了 Photoshop 常用快捷键,让你的工作更快更简单。

HTML5手册

A Sea of Schemes

2.5 A Sea of Schemes
In this section, we’ll take a look at the more common scheme formats on the Web. Appendix A gives a fairly exhaustive list of schemes and references to their individual documentation.
Table 2-4 summarizes some of the most popular schemes. Reviewing Section 2.2 will make the syntax portion of the table a [...]

how a browser uses HTTP to display a simple HTML resource

* 这个是来自《HTTP The Definitive Guide》的解释,当然这个只是层面上的解释,如果要理解底层的知识,应该看《unix网络编程>

(a)
The browser extracts the server’s hostname from the URL.
(b)
The browser converts the server’s hostname into the server’s IP address.
(c)
The browser extracts the port number (if any) from the URL.
(d)
The browser establishes a TCP connection with the web server.
(e)
The browser sends an HTTP request message to the server.
(f)
The server sends an HTTP [...]

面试题目

面试题目的备份
interview.tar.gz

configure

在RedHat AS4 安装http://blog.s135.com/nginx_php_v5/遇到的一个libpng的问题
下载了其中的rpm,安装但是编译php的时候老是遇到configure: error: png.h not found.的问题
我到/usr/src/redhat/SOURCES/找到
libpng-1.2.7.tar.bz2
1. tar jxvf libpng-1.2.7.tar.bz2
2. cp scripts/makefile.std makefile
3. make
4. make install
这个问题才解决
不知道rpm安装为什么不成功…

如果将C源文件(.c)生成目标文件(.o)

cc -c -o source.c target.o
或者可以把其做成lib
gcc -g -c source.c
ar -rc libsource.a source.o

在Yii使用Mixin – Behavior

我们知道Ruby有Mixin的功能,可以扩展类的实例方法或者类方法,只需要include就可以做这样的事情,但是PHP好像没有这样好用的方法?但是在Yii有这样的方法,怎么实现呢?
下面有一个例子:

 
Yii::app()->fileCache->attachBehavior(’EFileCacheBehavior’, array(’class’=>’EFileCacheBehavior’));

如果要在App启动的时候就能永这个EFileCacheBehavior,可以在Main.php配置这个文件…

‘fileCache’=>array(
‘class’=>’application.extensions.filecache.EFileCache’,
‘autoCleanExpiredCache’=>false,
‘behaviors’=>array(
‘EFileCacheBehavior’=>array(
[...]