- 浏览: 29627 次
-
最新评论
-
chenzheng8975:
未完结啊!!!!!!!!!!!!!!
struts2标签
文章列表
常用的正则表达式主要有以下几种:
匹配中文字符的正则表达式: [\u4e00-\u9fa5]
评注:匹配中文还真是个头疼的事,有了这个表达式就好办了哦
获取日期正则表达式:\d{4}[年|\-|\.]\d{\1-\12}[月|\-|\.]\d{\1-\31}日?
评注:可用来匹配大多数年月日信息。
匹配双字节字符(包括汉字在内):[^\x00-\xff]
评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
匹配空白行的正则表达式:\n\s*\r
评注:可以用来删除空白行
匹配HTML标记的正则表达 ...
几天前有人问我设置了字段的默认值为什么无效呢?查找了一些资料,做了一个总结:
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->create table TEST
(
ID VARCHAR2(64),
A VARCHAR2(3) default '0',
NAME VARCH ...
今天在做sql查询时发现了这样的问题,在网上搜索找到了答案,是别人写的。 如:select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mm:ss') from dual; 原因是SQL中不区分大小写,MM和mm被认为是相同的格式代码,所以Oracle的SQL采用了mi代替分钟。 select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mi:ss') from dual; 二、另要以24小时的形式显示出来要用HH24 select to_char(sysdate,'yyyy-MM-dd HH24 ...
text-align: -moz-center ; /*For Firefox*/
text-align: center; /*For IE*/
<hr style="width:726px;height:3px;text-align:left;color:#666666;border:none;border-top:1px solid #B3B3B3;border-bottom: 1px solid #B3B3B3;">
text-align:左对齐
color:线条颜色
border-top:上边框线
border-bottom:下边框线
height:线条包括边框的总高度
显示效果为上中下三条线
http://www.blogjava.net/cheneyfree/archive/2007/05/26/120168.html
可以跨多个请求保存会话状态,与一个特定可和的整个会话期间, HttpSession 对象会持久存储。
在响应中发送一个会话:
HttpSession session=request.getSession();// 等价于 request.getSession(true)
//HttpSession session=request.getSession(false); 返回一个已经存在的会话,如果没有与此客户相关联的会话,返回 null
Web ...
例一:
<html>
<head>
<base href="<%=basePath%>">
<title>登录页面</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
< ...
例一:
public class Test extends Thread{
public void run(){
try {
Thread.sleep(1000*5);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("101");
}
}
public class Maintest {
public static void main(String[] args) {
System.out.p ...
<body bgcolor="">
<%
ArrayList<Book> al=(ArrayList<Book>)request.getAttribute("booklist");
int pageCount=Integer.parseInt(request.getAttribute("pagecount").toString());
%>
<a href="/Shopping/Logout"><font ...
java时间格式大全
java.util.*;
import java.text.*;
import java.util.Calendar;
public class VeDate {
/**
获取现在时间
*
* @return 返回时间类型 yyyy-MM-dd HH:mm:ss
*/
public static Date getNowDate() {
Date currentTime = new Date();
SimpleDateFormat formatter = new SimpleDat ...