java
iteye_17980
这个作者很懒,什么都没留下…
展开
-
jdk调优
-Xms300m -Xmx300m -XX:MaxNewSize=300m -XX:MaxPermSize=300m 设置<内存的1/2原创 2010-08-13 17:29:19 · 91 阅读 · 0 评论 -
ibatis 使用过程中 经验
sqlmap 中配置sql时候 如果sql出现 < > ‘ 时候需要替换掉,否则.xml配置文件编译不通过 lt; < > > <> & & ' ' " " sqlmap配置中 传入...原创 2012-10-24 15:34:18 · 105 阅读 · 0 评论 -
action 获取绝对路径
action ServletActionContext.getRequest().getRealPath("/"); // D:\work\tpifweb\WebRoot\ String path = this.getClass().getClassLoader().getResource("").getFile(); // D:/tomcat-6/lib/ ...原创 2013-07-31 15:44:13 · 368 阅读 · 0 评论 -
DB2 查询系统表
select * from syscat.tables db2 查询系统表 tabname 表明字 CREATE TABLE CESHI_AREA_CITY ( AREA_ID VARCHAR(10), CITY_ID VARCHAR(15) ) DATA CAPTURE NONE IN TBS01 创建表语句 在TBSO1表空间上创建...原创 2011-03-04 16:26:47 · 517 阅读 · 0 评论 -
java 格式化
http://cai555.iteye.com/blog/571210 转载 在C中可以使用类似printf(“%d %8.2f\\n”, 1001, 52.335)的方法实现格式化输出,可是Java中的System.out.println()并没有对应的功能。要格式化输出,必须使用java.text包中的类来实现类似的操作(要不怎么体现面向对象的优越性呢,不过据说jdk1.5准备又补上)。...原创 2011-02-24 09:42:03 · 148 阅读 · 0 评论 -
java文件操作
转载 :: http://chengzhi-hong.iteye.com/blog/781321 文件的建立/检查与删除 String path=request.getRealPath(""); //out.println(path); File f=new File(path,"File.txt"); //out.println(f); //out.println(f.exis...原创 2011-02-21 14:16:43 · 70 阅读 · 0 评论 -
java分页封装类
public class Pager{ public final static int PAGESIZE = 10; private int pageSize = PAGESIZE; private int totalCount; private int currentPage; private int totalPage; private List items...原创 2010-08-02 20:55:18 · 129 阅读 · 0 评论 -
JNI 调 C C++ 参数String
首先编译java的类。 类中方法必须是 native 得到.class文件。 然后 javah HelloJni 得到 HelloJni.h 文件 这个文件是c c++的头文件。通过它可以调用c的dll工程 jni.h是jdk下面的 我的路径是E:\jdk5\include 里面的.h文件 dll工程都需要。 [code="HelloJni.h"]/* DO NOT...原创 2011-01-25 11:22:43 · 249 阅读 · 0 评论 -
数字格式化返回字符串
public static DecimalFormat seqFormat = new DecimalFormat("000.000"); //按照指定的 字符形式格式化 返回字符串 public static void main(String[] args) { String str = seqFormat.format(13332.34532); System.out.printl...原创 2010-09-27 10:32:51 · 127 阅读 · 0 评论 -
ddl语句
查询表的所有主键 select * from user_constraints; 删除级联删除约束 alert table xxx drop constraint constraint_name [cascade]; 在删除表中字段时,如果该字段出于多字段联接 删除会失败 此时可用 cascade constraints alter table xxx dr...原创 2010-08-29 12:32:43 · 89 阅读 · 0 评论 -
网上找的一些java基础笔试题
没啥好看的 一些网上笔试题原创 2010-08-23 23:24:23 · 92 阅读 · 0 评论 -
获取字符串中某字符出现个数
public static int strAppearTimes(String regex, String replacement) { if (regex == null || replacement == null) { return 0; } else { if (replacement.length() == 0 || regex.length() < replacement.len...原创 2010-08-19 17:16:13 · 107 阅读 · 0 评论 -
JAVA数字格式化
01. double pi = 3.1415927;//pi 02. // 取一位整数 03. System.out.println(new DecimalFormat("0").format(pi));// 3 04. // 取一位整数和两位小数 05. System.out.println...原创 2013-11-27 09:54:41 · 140 阅读 · 0 评论