老婆永远是对的

Tags: others

1.老婆永远是对的.

2.如果老婆错了,一定是我看错了.

3.如果我没有看错,一定是我的想法错了

4.如果我没有想错,只要老婆不认,老婆就没错.

5.如果老婆不认错,我还说老婆错,那就是我的错.

6.如果老婆认错了参考第一条,谢谢大家!!!



※ 来源:水木社区 newsmth.net

 

No Comments 2008-07-02 17:10:28 by No.0023

HTTP协议精解

Tags: dev, others

WEB服务器和浏览器之间的一问一答的交互过程也得遵循一定的规则,这个规则就是HTTP协议。它是TCP/IP协议集中的一个应用层协议,用于定义浏览器和WEB服务器之间交换数据过程以及数据本身的格式。现在被广泛使用的HTTP/1.1相对HTTP/1.0而言,最大的特点就是支持持续连接。

1.HTTP/1.0的会话方式:< /p>

                                         建立连接,发送请求信息         
                         -------------------------------------------------------------------------->
         客户机                                                                              服务器
                         <--------------------------------------------------------------------------
                                         关闭连接,回送响应消息

 

每次连接只处理一个请求,即使是对同一个网站的每一个页面的访问,浏览器和WEB服务器都要建立一次单独的连接。

 

2.HTTP/1.1的会话方式:< /p>

                                         建立连接,第1个请求信息         
                         -------------------------------------------------------------------------->
                                                   ............
                                         发送第N请求信息         
                         -------------------------------------------------------------------------->
         客户机                 回送第1次响应                                      服务器
                         <--------------------------------------------------------------------------                                        
                                                 ..............
                                         回应第n次响应
                         <--------------------------------------------------------------------------
                                         发送关闭连接请求         
                         -------------------------------------------------------------------------->          
                                         关闭连接              
                         <--------------------------------------------------------------------------

 

HTTP /1.1支持持久连接,在一个TCP连接上可以传送多个HTTP请求和响应,减少了建立和关闭连接的消耗和延迟。一个包含有许多图象的网页文件的多个请求和响应可以在一个连接中传输,但每个单独的网页文件的请求和响应仍然需要使用各自的连接,还允许客户端不用等待上一次请求结果返回就可以发送下一个请求。

 

HTTP消息的格式:
一个完整的请求消息包括:一个请求行、若干消息头、以及实体内容。
一个完整的响应消息包括:一个状态行、若干消息头、以及实体内容。
这在前面已经有过简单的介绍。下面对这几个部分再做个详细的解说:
1.请求行:包括三个部分,即请求方式、资源路径、以及使用的HTTP协议版本。语法如下:请求方式 资源路径 HTTP版本号<CRLF>,其中<CRLF>表示回车和换行这两个字符的组合。HTTP请求方式包括POST、GET、 HEAD、OPTIONS、DELETE、TRACE和PUT几种。常用的是前两种。
2.状态行:包括HTTP协议的版本号、一个状态码、以及对状态码进行描述的文本信息。
语法如下:HTTP版本号 状态码原因叙述<CRLF>

 

使用GET和POST传递参数:
在URL地址后面可以附加一些参数,每个参数都由参数名和参数值组成,中间用=分隔,各个参数用&分隔,URL地址和整个参数之间用?分隔,如下所示:
http://www.it315.org/servlet/ParamsServlet?param1=aaa&param2=bbb
使用GET传递参数的数据量是有限的,一般限制在1KB以下。使用POST比GET要大的多。是没有限制的。但是必须设置Content=Type消息头为&lsquo;application/x-www-form-urlencoded&rsquo;和设置Content-Length消息头为实体内容的长度。< /p>

响应状态码:
200:表示一切正常,返回的是正常请求结果。
404:表示服务器上不存在客户机上所请求的资源,这个状态码在浏览网页时最常见的。

 

通用信息头:
Cache-Control:此字段用于通知客户机和服务器之间的代理服务器如何使用已缓存的页面。
Connection:用于指定处理完本次请求/响应后,客户端和服务器是否还要继续保持连接。
Date:用于表示HTTP消息产生的当前时间。
Transfer-Encoding:用于指定实体内容的传输编码方式。

 

请求头:
Accept:用于指定客户端程序能够处理的MIME类型。有多个时用逗号隔开。
Accept-Charset:指出客户端程序可以使用的字符集。有多个时用逗号隔开。
Accept-Encoding:指定客户机能够进行解码的数据编码方式。有多个时用逗号隔开。
Accept-Language:指定客户机期望服务器返回哪个国家语言的文档。有多个时用逗号隔开。
Host:指定资源所在的主机名和端口号。

 

响应头:
Accept-Range:用于说明当前WEB服务器是否接受Range请求和Range请求中指定的数据的单位。
Location:用于通知客户机应该到哪个新的地址去获取文档。由于当前响应并没有直接返回内容给客户机,所以使用Location头的HTTP消息不应该有实体内容,由此可见,在消息头中不能同时出现Location和Contect-Type这两个头自段。

 

实体头:
Allow:用于指定客户机请求的资源所支持的请求方法。
Content-Encoding:用于指定实体内容的压缩编码方式。
Content-Language:用于指定返回的网页文档的国家语言类型。
Content-Length:用于指定实体内容的长度。
Content-Location:用于指定响应消息中所封装的实体内容的实际位置路径。
Content-Type:用于指定实体内容的MIME类型。客户机通过检查服务器响应消息的此字段中的MIME类型就能知道实体内容的数据格式和知道以何种方式来进行处理了。<Tomcat>安装目录下的conf目录下的web.xml文件里面就定义了很多的类型。
Last-Modified:用于指定文档的最后修改时间。

 

扩展头:
Refresh:此字段告诉浏览器隔多长时间刷新。(转载)

No Comments 2008-07-02 17:05:05 by No.0023

OpenBSD command: cdio

Tags: command, OpenBSD

Shell:~/tmp >: cdio
No CD device name specified. Defaulting to cd0.
Compact Disc Control utility, version 2.1
Type `?' for command list

cdio> ?
        ClOSE
        DEBuG on | off
        DeVICE devname
        EjECT
        HeLP
        InFO
        NeXT
        PAuSE
        PlAY track1[.index1] [track2[.index2]]
        PlAY [tr1] m1:s1[.f1] [tr2] [m2:s2[.f2]]
        PlAY [#block [len]]
        PReVIOUS
        QuIT
        RESEt
        ReSUME
        REPlAY
        SEt msf | lba
        StATUS
        STOp
        VoLUME <l> <r> | left | right | mute | mono | stereo
        CDdBINFO [n]
        CDId
        EXiT
        BlANK
        CdRIP [[track1-trackN] ...]
        CdPLAY [[track1-trackN] ...]

        The word "play" is not required for the play commands.
        The plain target address is taken as a synonym for play.
cdio>

No Comments 2008-07-02 17:02:48 by No.0023

OpenBSD command: biff

Tags: command, OpenBSD

BIFF(1)                    OpenBSD Reference Manual                    BIFF(1)

NAME
     biff - be notified if mail arrives and who it is from

SYNOPSIS
     biff [n | y]

DESCRIPTION
     biff informs the system whether you want to be notified when mail arrives
     during the current terminal session.

     The options are as follows:

     n       Disables notification.

     y       Enables notification.

     When mail notification is enabled, the header and first few lines of the
     message will be printed on your screen whenever mail arrives.  A ``biff
     y'' command is often included in the file .login or .profile to be exe-
     cuted at each login.

     biff operates asynchronously.  For synchronous notification use the MAIL
     variable of sh(1) or the mail variable of csh(1).

SEE ALSO
     csh(1), mail(1), sh(1), comsat(8)

HISTORY
     The biff command appeared in 4.0BSD.  "Biff" was Heidi Stettner's dog.
     He died in August 1993, at 15.

OpenBSD 4.2                      May 31, 2007                                1
Shell:~/tmp >:

No Comments 2008-07-02 17:01:58 by No.0023

OpenBSD command: systrace

Tags: command, OpenBSD

SYSTRACE(1)                OpenBSD Reference Manual                SYSTRACE(1)

NAME
     systrace - generate and enforce system call policies

SYNOPSIS
     systrace [-AaCeitUuV] [-c user:group] [-d policydir] [-E logfile]
              [-f file] [-g gui] [-p pid] command ...

DESCRIPTION
     The systrace utility monitors and controls an application's access to the
     system by enforcing access policies for system calls.  The systrace util-
     ity might be used to trace an untrusted application's access to the sys-
     tem.  Alternatively, it might be used to protect the system from software
     bugs (such as buffer overflows) by constraining a daemon's access to the
     system.  Its privilege elevation feature can be used to obviate the need
     to run large, untrusted programs as root when only one or two system
     calls require root privilege.

     The access policy can be generated interactively or obtained from a poli-
     cy file.  Interactive policy generation will be performed by the
     ``notification user agent'', normally xsystrace(1), unless text mode is
     specified via -t.

     When running in ``automatic enforcement'' mode, operations not covered by
     the policy raise an alarm and allow a user to refine the currently con-
     figured policy.

No Comments 2008-07-02 17:01:04 by No.0023

在OpenBSD4.2安装显卡驱动

Tags: OpenBSD

我的显卡是Intel 965,已经从官方网站上看到,已经支持了,模块是i810,安装步骤如下:

1, 下载src.tar.gz,sys.tar.gz,xenocara.tar.gz,解压到 /usr/src :
# tar -zxvf srs.tar.gz -C /usr/src
# tar -zxvf sys.tar.gz -C /usr/src
# tar -zxvf xenocara.tar.gz -C /usr/src

2. 安装:

# cd /usr/src/xenocara/driver/xf86-video-intel
# rm -f obj
# make -f Makefile.bsd-wrapper cleandir
# mkdir XOBJDIR
# make -f Makefile.bsd-wrapper obj
# make -f Makefile.bsd-wrapper build


安装后从man手册页已经看到了:

# man i810

I810(4) I810(4)

NAME
i810 - Intel 8xx integrated graphics chipsets

SYNOPSIS
Section "Device"
Identifier "devname"
Driver "i810"
...
EndSection

DESCRIPTION
i810 is an Xorg driver for Intel integrated graphics
chipsets. The driver supports depths 8, 15, 16 and 24.
All visual types are supported in depth 8. For the
i810/i815 other depths support the TrueColor and Direct-
Color visuals. For the i830M and later, only the True-
Color visual is supported for depths greater than 8. The
driver supports hardware accelerated 3D via the Direct
Rendering Infrastructure (DRI), but only in depth 16 for
the i810/i815 and depths 16 and 24 for the 830M and later.

SUPPORTED HARDWARE
i810 supports the i810, i810-DC100, i810e, i815, i830M,
845G, 852GM, 855GM, 865G, 915G, 915GM, 945G, 945GM, 965G,
965Q and 946GZ chipsets.
....

No Comments 2008-07-02 16:59:34 by No.0023

SCIM 词码表 ---- 万能五笔

Tags: others


Linux:   Wnwb-linux.tar.gz
OpenBSD: Wnwb-OpenBSD.tar.gz

存放路径:
Linux:   /usr/share/scim/tables/
OpenBSD: /usr/local/share/scim/tables/

下载后改文件扩展名为: *.tar.gz 后再解压,重启Xwindow后就可以看到了,万能五笔哦。

No Comments 2008-07-02 16:58:07 by No.0023

PGP PUBLIC KEY

Tags: unix, others

Here is my public PGP key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.8 (OpenBSD)

mQGiBEiTdXsRBADbaQp99heFlinoOiJP8GZWcMIKXjelDZr9sWoTcfa7VL7CT2cf
8Dd0zMEVJ3y0H1/ipuvxu3P+vGo01vwNDK5Gja+5PHLMkxayn/3KVccUeX+rBRbn
51OuBr2WY+lPgJwOj7CqJ/S1QO0r5gRFWtq7TSvsOh1b0Fdttjnn2wbXGwCgr3n0
4mA4ocipyYuxlb9YwvncXAMD/RIRzwyHls2FEOdrL7Lrz3/WTRE5jk0PwryeIUrH
cdteiDuascqi16rvMNbcuOrUMP6LE4Rsn/XiXV+/cx6krYrieMYoQjgTDFyoxAc+
eQoNEhyNokLW9q3YQhUAW8E6q4OvlZfFxhYMEkPspm6Vp2zGExpnv6SBlWdwkcCQ
X4MoA/0WKKVtLhh0B9wfcmu7dbtAH9v+I4u3qlHreOuwStX5CJDfv9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HQdpxhXwAoJX2uYi+Ui7udN8BZbyg/q8rrmXfAJ9G
43s7DxS2guqPsADHkYeEzxrDLg==
=TvaW
-----END PGP PUBLIC KEY BLOCK-----


you can get it from server also, as:

$ gpg --keyserver pgp.mit.edu --recv-keys C741DA71

No Comments 2008-07-02 16:54:42 by No.0023

w3m

Tags: unix, command

w3mman:
Shell:/var/db/pkg >: pkg_info -L w3m-0.5.1p2-image
Information for w3m-0.5.1p2-image

Files:
/usr/local/bin/w3m
/usr/local/bin/w3mman
/usr/local/libexec/w3m/cgi-bin/dirlist.cgi
/usr/local/libexec/w3m/cgi-bin/multipart.cgi
/usr/local/libexec/w3m/cgi-bin/w3mbookmark
/usr/local/libexec/w3m/cgi-bin/w3mhelp.cgi
/usr/local/libexec/w3m/cgi-bin/w3mhelperpanel
/usr/local/libexec/w3m/cgi-bin/w3mmail.cgi
/usr/local/libexec/w3m/cgi-bin/w3mman2html.cgi
/usr/local/libexec/w3m/inflate
/usr/local/man/man1/w3m.1
....

No Comments 2008-07-02 16:53:23 by No.0023

ssh 代理

Tags: unix, ssh
如果你有一个ssh shell,比如: 192.168.1.23
于是你随时拥有了一个socks5代理了: ssh -2CNf -D 3121 192.168.1.23
端口为3121, 可以用来上QQ,MSN等等,如果你非要一个http代理,那就安装一个软件叫: privoxy
写它的配置文件: 
vi /etc/privoxy/config:

listen-address 127.0.0.1:3128
permit-access 127.0.0.1
forward-socks4 / 127.0.0.1:3121 .      # 注意有个句号哦。

端口为3128。
如果你的ssh shell在国外的话,你可以穿过那伟大的GFW。

No Comments 2008-07-02 16:51:35 by No.0023

Python Sites

Tags: Python
Python Sites
Python Python Enhancement Proposals Jython Mod_python
Boost.Python pygame Yahoo! Developer Network  
Chinese Community
Python.cn CZUG WoodPecker  
Web Programming
CGI Scripts Zope Django TurboGears
Plone Python Paste Pylons XML Processing
Quixote Karrigell Webpy CherryPy
Myghty Cheetah Webware for Python Aquarium
Subway Spyce Tahchee Python CGI
Databases
Database Modules Persistence Standard Database API SQLObject
Networking
Twisted Sockets    
Software Development
Trac Roundup SCons Buildbot
Apache Gump ActiveGrid EasyEclipse BoaConstructor

No Comments 2008-07-02 16:49:51 by No.0023

Python一些网址

Tags: Python

Python: www.python.org
ActivePython: www.activestate.com
Stackless Python: www.stackless.com
IronPython: www.ironpython.com
PyPy: pypy.org

Django: www.djangoproject.com
Mod_Python: www.modpython.org
Webware: www.webwareforpython.org
CherryPy: www.cherrypy.org
Web.py: webpy.org
Zope: www.zope.org
Turbogears: www.turbogears.org

WxPython: www.wxpython.org
PyGtk: www.pygtk.org
PyQt: http://trolltech.com/products/qt


Python Documentation Online: http://pydoc.org, http://docs.python.org
Python-cn: http://python.cn
Pythonic: http://www.woodpecker.org.cn
The Daily Python-URL: http://www.pythonware.com/daily/index.htm
Python Package Index: http://pypi.python.org
Planet Python: http://www.planetpython.org
Pythonite: http://www.pythonite.org
Useless Python: http://www.uselesspython.com
Python Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python

No Comments 2008-07-02 16:48:25 by No.0023

Python 邮件列表

Tags: Python

comp.lang.python                            http://groups.google.com/group/comp.lang.python

python-chinese@lists.python.cn     中国Python用户组开发人员

python-cn@googlegroups.com        Chinese Python User Group

CPUG@googlegroups.com             China Python User Group -- 华蟒用户组

bpug@googlegroups.com              北京Python用户群

zpug@googlegroups.com              泛珠江三角洲

szpug@googlegroups.com             深圳 Python 用户组

czug-org@googlegroups.com

No Comments 2008-07-02 16:47:29 by No.0023

Python IAQ: 少有回答的问题

Tags: Python

http://www.chenwy.com/python-iaq-cn.html

No Comments 2008-07-02 16:45:54 by No.0023

Python Tutorials

Tags: Python

http://www.awaretek.com/tutorials.html

No Comments 2008-07-02 16:44:08 by No.0023

Python Books

Tags: Python

http://www.pythonid.com/html/wendangxiazai/index.html

No Comments 2008-07-02 16:42:45 by No.0023

Custom sidebar

Tags: blog

my custom sidebar values for this blog:

{{ W.Tags }}
{{ W.RecentPosts }}
{{ W.RecentComments }}
{{ W.Blogroll }}

No Comments 2008-07-02 13:35:36 by No.0023

转载:《Spring Framework 2.5 Reference》中文版正式发布

Tags: spring, java

Spring中文参考手册得到Spring Framework开发团队的直接授权和大力的支持,其目的是在中文世界推广优秀的开源技术。

本次翻译活动由满江红开放技术研究组织(http://www.redsaga.com)和Spring中文论坛(http://spring.jactiongroup.net) 共同发起、组织。

我们在此郑重宣布,本次翻译遵循原Spring Framework的授权协议,即Apache 2.0协议。在完整保留全部文本(包括本版权页),

并且不违反Apache 2.0协议的前提下,允许和鼓励任何人进行全文转载及推广,所有参与人员放弃除署名权外的一切权利。

在线版本: HTML / HTML Single

下载地址: PDF(593页,4.41MB) / CHM(2.08MB)

勘误表:

勘误表(Spring 2.5)

 

from JavaRead.com

No Comments 2008-07-02 08:44:41 by No.0023

Google 日历

Tags: TODO

...

No Comments 2008-06-30 23:32:57 by No.0023

Tags & Tags by month, year

Tags: TODO

分类标签: completed.

No Comments 2008-06-30 23:29:23 by No.0023


共有文章169篇 第(8/9)页 首页 上一页 1 2 3 4 5 6 7 8 ... 下一页 末页