google PR值更新了…
java正则表达式
例子1
public void testa(){
Pattern p = Pattern.compile(“.*from.*”);
String x = “select cola from ta”;
Matcher m = p.matcher(x);
System.out.println(m.matches());//输出true
}
public void testb(){
Pattern p = Pattern.compile(“.*from.*”,Pattern.CASE_INSENSITIVE);
String x = “select cola FROM ta”; //FROM 大写
Matcher m = p.matcher(x);
System.out.println(m.matches());//输出false
}
public void testC(){
Pattern p = Pattern.compile(“.*from.*”,Pattern.CASE_INSENSITIVE);//忽略大小写
String x = “select cola FROM ta”;
Matcher m = p.matcher(x);
System.out.println(m.matches());//输出true
}
How do I get hold of the HttpServletRequest
HttpServletRequest request = ServletActionContext.getRequest();
if (request != null)
{
// do something here
}
You should always assume that ServletActionContext.getRequest() will return null. ServletActionContext is only populated if the request comes in through WebWork. There are a number of circumstances in which it will not be populated, either because a web request has come in through some other path, or because there was no web request in the first place:
mysql TIMESTAMP 不能为NULL
由于开发过程中一直使用oracle,而现在使用mysql开发时,遇到了一个小问题。
创建的一张表中,有一个字段类型是 TIMESTAMP ,我想将此字段设置为允许为NULL值的,但是总是失败,这个字段就是不能含有NULL值。
在中国可用的Google服务
google的新页面,通过此地址可以了解到哪些服务是可以在中国获取的。
http://www.google.com/prc/report.html
仅此记录
莫斯科地铁遭连环恐怖袭击34人死…
2010年最值得你用的wordpress插件
wordpress的主要优点是使用简单、插件众多。其他的也不多说什么了。对于用惯了wordpress的人来说,再使用其他的程序可能会感觉很难用吧。
这里推荐出 2010年最值得你用的wordpress插件
- WP Super Cache –
这个插件之所以伟大,主要在于如下两点:
第一,它使你的网站加载速度更加快。
第二,因为它存储了你网站的静态版本,这样就比wordpress自身功能减少了CPU处理时间。
这也是我将这个插件排在第一位的原因。
BidVertiser 开始支持弹出式广告
Bidvertiser是一家与Google adsense广告类似的的一家美国广告联盟.
今天收到了Bidvertiser发来的邮件,说是在4月1号开始支持弹出式广告。这对有英文站的朋友来说,是一个很不错的消息,因为弹出式广告单价应该不错。(不支持中文站的,只支持英文站,因此没有英文站的朋友可以去忙别的了)。
在百度中搜索 “凡人修仙传QQ群” 本站在第一名! 有图有真相
头一段时间创建了一个QQ群,名字叫做 凡人修仙传QQ群 群号:74570580
今天突然发现加群的人增多了,于是到量子统计中看了看,这个关键词竟然排在第一位,于是在百度中尝试搜索了一个,果不其然,本站不仅在第一页,并且是在第一位,呵呵。
case when then else end
SELECT * FROM table WHERE table_id = CASE WHEN (1 = 1) THEN 1 ELSE 0 END
经测试:在oracle9i ,sqlserver2005及 mysql5上运行正常。
最近评论