- 浏览: 10613 次
- 性别:
- 来自: 北京
最新评论
文章列表
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
/*
* These are the functions you'll usuall ...
如果是在myeclipse中启动出现这个问题,要是myeclipse中设置tomcat的启动参数
路径:Myeclipse->preferences->myeclipse->servers->tomcat->tomcat×.×->下,
-Xms1024M -Xmx1024M -XX:MaxPermSize=400M不设置就算tomcat中设置了,也还是按默认的128M运行,这里的设置也要根据自己的机器的实际情况来定。
《demo.jsp》
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/taget/hellotag.tld" prefix="mytag"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+r ...
插件名叫做Subclipse,官方网站的下载地址在http://subclipse.tigris.org/ ,也提供了update site http://subclipse.tigris.org/update
Name: Subclipse 1.2.x (Eclipse 3.2+) URL: http://subclipse.tigris.org/update_1.2.x
MyEclipse 6.0 代码提示的设置 MyEclipse 选择 Windows ->Preperences ->General ->keys 找到 word completion的快捷键
把原alt+/删掉!//必须 把Content Assist 的快捷键 改成alt+/ 或者你想改的其他快捷键
改变数据库的默认编码配置,在MYSQL的安装目录中,找到my.ini,修改默认编码为:default-character-set=utf8
解决办法其实也很简单,首先要保证你为openfire创建的数据库编码是utf8的,建表语句如下:
create database openfire default character set utf8 default collate utf8_general_ci
其次,在初始化openfire数据库时,必须在连接里增加UTF8的编码要求,连接字符串设置如下:
jdbc:mysql://127.0.0.1:3306/openfire?useUn ...
web.xml设置参数
<context-param>
<param-name>ENCODE</param-name>
<param-value>utf-8</param-value>
</context-param>
程序获得参数
HttpServletRequest hsr=(HttpServletRequest)request;
String encode=hsr.getSession().getServletContext().getInitParameter("ENCODE") ...
// TODO Auto-generated method stub
//1-50 个字符(包括英文大小写字母,数字,英文半角符号_或-)
String data="_javaasdfa123_sdfa-www";
data="Dsdf_d-sdf";
String regex_Str="^[a-zA-Z]{1}([a-zA-Z0-9]|[-_]){0,49}";
boolean result=Pattern.matches(regex_Str,data);
System.out.println(result) ...
创建ReentrantReadWriteLock对象
private ReentrantReadWriteLock rrw= new ReentrantReadWriteLock();
创建读锁和写锁:
private Lock readLock = rrw.readlock();
private Lock writeLock = rrw.writelock();
对写程序加锁:
public double set()
{
writeLock.lock();
try{ doSomething(); }
finally{ writeLock.unlock(); } ...