上一页 1 2 3 4 5 6 ··· 12 下一页
网络上类似的代码一般都是JS判断字符串是否全为中文,但判断是否包含中文的代码很少,这里提供三种方法:<script language="javascript"> function funcChina(){ var obj = document.form1.txtName.value; if(/.*[\u4e00-\u9fa5]+.*$/.test(obj)) { alert("不能含有汉字!"); return false; } return true; } </script> <form name="form1& Read More
posted @ 2013-04-26 16:09 技术草根女 Views(10278) Comments(0) Diggs(0) Edit
以下以oralce为例,查看数据库版本?可以在pl/sql上执行:select * from v$version;查看字符集?select * from v$nls_parameters;select * from nls_database_parameters; Read More
posted @ 2013-04-26 14:26 技术草根女 Views(539) Comments(0) Diggs(0) Edit
http://zhangyaochun.iteye.com/blog/1419994其实这个是一个老问题了,简单记录一下吧,个人学习。首先上几个概念性的结论:onclick的事件被先执行,其次是href中定义的(页面跳转或者javascript)同时存在两个定义的时候(onclick与href都定义了),如果想阻止href的动作,在onclick必须加上return false;在href中定义的函数如果有返回值的话,当前页面的内容将被返回值代替。这样的话,可以在onclick()中预先做很多事情,值替换,等等。 Read More
posted @ 2013-04-22 20:59 技术草根女 Views(7875) Comments(0) Diggs(0) Edit
上周,否极了。这周,泰来了。工作,一如过山车般刺激,难嚼。保持平静。雅安,地震了,希望大伙一切都好。衷心祈福。 Read More
posted @ 2013-04-22 10:54 技术草根女 Views(185) Comments(0) Diggs(0) Edit
为节约键盘敲击次数,记PreparedStatement为PS, PreparedStatementCache为PSCache,并且所有的SQL使用的绑定变量。原理:http://www.dbafree.net/?p=287http://agapple.iteye.com/blog/838286http://singleant.iteye.com/blog/1298837使用:1. 使用ps.sql里用?占位,等待被替换。例如,select * from table1 where user_name = ? and age > ?2. 启用pscache。<bean id=&quo Read More
posted @ 2013-04-18 18:09 技术草根女 Views(14892) Comments(1) Diggs(0) Edit
今天看代码,发现log4j.properties。没有相应的加载代码,但它却生效了,这多神奇!看进去,org.apache.log4j,LogManager.java,其有一个static方法块: static { // By default we use a DefaultRepositorySelector which always returns 'h'. Hierarchy h = new Hierarchy(new RootLogger((Level) Level.DEBUG)); repositorySelector = new DefaultRepositor.. Read More
posted @ 2013-04-18 13:34 技术草根女 Views(8342) Comments(0) Diggs(4) Edit
xfire调用简单示例。import java.util.HashMap;import org.codehaus.xfire.XFireFactory;import org.codehaus.xfire.client.XFireProxyFactory;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import org.codehaus.xfire.transport.http.CommonsHttpMessageSender;public class TestXfireCaller { private Stri. Read More
posted @ 2013-04-17 18:34 技术草根女 Views(501) Comments(0) Diggs(0) Edit
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));br.readline(); Read More
posted @ 2013-04-15 13:32 技术草根女 Views(166) Comments(0) Diggs(0) Edit
ApplicationContext,读取bean、属性、属性值,demo:public class HutuAbstractTopicEventcode { private String ctxPath = "C:/happyday/demo.xml"; private String moduleName = "happybaby"; public static void main(String[] args) { HutuAbstractTopicEventcode o = new HutuAbstr... Read More
posted @ 2013-04-15 11:13 技术草根女 Views(5161) Comments(0) Diggs(0) Edit
我要啰里八嗦一些东西了。以下陈述,基于这些事实:前端页面:.vm, velocity + jqueryMVC:加强版的spring mvcController:@Controller, @RequestMapping,.htm, .json, GET, POST1).htm每一个.htm,在控制器里@Controller,意味着要写一个方法,该方法头部顶着@RequestMapping(value = "/topicEventcode.htm", method = RequestMethod.GET)。这样,页面刷新多次,都可以执行到该方法内。我之前遇到这样一个问题,写的不 Read More
posted @ 2013-04-09 18:26 技术草根女 Views(7429) Comments(0) Diggs(0) Edit
上一页 1 2 3 4 5 6 ··· 12 下一页