追求编程之美

先做人,再做技术人员,最后做程序员。
数据加载中……

2009年6月4日

css学习之背景

CSS 允许应用纯色作为背景,也允许使用背景图像创建相当复杂的效果。CSS 在这方面的能力远远在 HTML 之上

背景色

 

可以使用background-color 属性为元素设置背景色,这个属性接受任何合法的颜色值。

这条规则把元素的背景设为灰色:p{background-color :gray;}

如果你希望背景色从元素中的文本向外至少有延伸,只需增加一些内边框:p {background-color: gray; padding: 20px;}background-image 属性的默认值是 none,表示背景上没有放置任何图像。

背景图像

要把图像放入背景,需要使用  background-image 属性

posted @ 2009-10-25 17:17 yanZhangWu 阅读(184) | 评论 (0)编辑 收藏
date_trunc函数的用法

9.9.2. date_trunc

The function date_trunc is conceptually similar to the trunc function for numbers.

 

date_trunc('field', source)

source is a value expression of type timestamp or interval. (Values of type date and time are cast automatically, to timestamp or interval respectively.) field selects to which precision to truncate the input value. The return value is of type timestamp or interval with all fields that are less significant than the selected one set to zero (or one, for day and month).

Valid values for field are:

 

microseconds
milliseconds
second
minute
hour
day
week
month
quarter
year
decade
century
millennium

 

 

Examples:

SELECT date_trunc('hour', TIMESTAMP '2001-02-16 20:38:40');
Result: 2001-02-16 20:00:00
SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40');
Result: 2001-01-01 00:00:00

 

posted @ 2009-07-24 07:02 yanZhangWu 阅读(12931) | 评论 (0)编辑 收藏
感情婚姻的五大需求


1、最基本的需求 性
2、跟你生活协调
3、可以沟通的人
4、互相信任
5、可以互相学习

posted @ 2009-06-20 09:55 yanZhangWu 阅读(200) | 评论 (0)编辑 收藏
unix 同时启动两个tomcat配置

所用Tomcat服务器都为zip版,非安装版。以两个为例:

  安装第二个Tomcat完成后,到安装目录下的conf子目录中打开server.XML文件,查找以下三处:

  (1)修改http访问端口(默认为8080端口)

  minProcessors="5"maxProcessors="75"

  enableLookups="true"redirectPort="8443"

  acceptCount="100"debug="0"connectionTimeout="20000"

  useURIValidationHack="false"disableUploadTimeout="true"/>

  (大概在86行左右)将8080修改为第一个tomcat不在使用的端口号。此处所设的端口号即是以后访问Web时所用的端口号。

  (2)修改Shutdown端口(默认为8005端口)

  (大概在13行左右)将8005修改为没有在使用的端口号,例如8095

  (3)修改8009端口

  

  

<ConnectorclassName="org.apache.coyote.tomcat4.CoyoteConnector"port="8009"minProcessors="5"maxProcessors="75"enableLookups="true"redirectPort="8443"acceptCount="10"debug="0"connectionTimeout="20000"useURIValidationHack="false"protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

http://www.mscto.com

  (大概在107行左右)将8009修改为没有在使用的端口号,例如8099

  这样就没问题了。

posted @ 2009-06-04 13:10 yanZhangWu 阅读(499) | 评论 (0)编辑 收藏