1. Struts2的类型转换,对于8个原生数据类型以及Date,String等常见类型,Struts2可以使用内建的类型转换器实现自动的转换;但对于自定义的类型转换来说, 就需要我们自己指定类型转器的方式。2. 类型转换器必须继承DefaultTypeConverter,一般继承它的子类Stru....
分类:
其他好文 时间:
2015-01-17 19:24:20
阅读次数:
217
以连接MSSQLServer为例步骤:1 创建项目2 导入数据库的驱动jar包3 在src下面创建四个包db :连接数据库的工具类 连接数据库需要四个条件: 1、DRIVER_STRING,连接数据库驱动 2、UR_STRING,URL地址,并且设定连接到哪个数据库 3、UER_STRI...
分类:
数据库 时间:
2015-01-17 19:19:25
阅读次数:
295
1.描述:在原有时间上增加一个时间差:
代码示例:
Date psd = sysDate();
String workTimeP1 = mapP.get("WORK_TIME_") != null ? mapP.get("WORK_TIME_").toString() : "0";
int news=Integer.parseInt(workT...
分类:
编程语言 时间:
2015-01-17 18:11:02
阅读次数:
201
题目:
Given a string, find the length of the longest substring without repeating characters. For example,
the longest substring without repeating letters for "abcabcbb" is "abc", which the length is ...
分类:
编程语言 时间:
2015-01-17 18:10:44
阅读次数:
251
构建一个线程池,可以在池中创建对个线程,用这个线程池去处理事情,会根据实际情况有线程池中的线程分配处理。
public class TestThreadPool {
public static void main(String[] args) {
//ExecutorService ec = Executors.newFixedThreadPool(3);//固定线程数
//E...
分类:
编程语言 时间:
2015-01-17 18:05:18
阅读次数:
196
一:类型1 不可变数据类型string,int ,tuple 常量字符串不可变之再探string[1] = 'new_one' can?2 可变数据类型变量dict list二 再研究字符串序列到底是什么1 三个符合的区别 '',"",""" """2 偏移量从0开始3 如何修改字符串之replac...
分类:
编程语言 时间:
2015-01-17 17:50:26
阅读次数:
184
在shell中常用的特殊符号罗列如下:# ; ;; . , / \\ 'string'| ! $ ${} $? $$ $*\"string\"* ** ? : ^ $# $@ `command`{} [] [[]] () (())|| && {xx,yy,zz,...}~ ~+ ~- & \\ + ...
分类:
系统相关 时间:
2015-01-17 17:49:50
阅读次数:
270
下面这个小工具包含了 判断unicode是否是汉字,数字,英文,或者其他字符。 全角符号转半角符号。 unicode字符串归一化等工作。
#!/usr/bin/env python
# -*- coding:GBK -*-
"""汉字处理的工具:
判断unicode是否是汉字,数字,英文,或者其他字符。
全角符号转半角符号。"""
def ...
分类:
编程语言 时间:
2015-01-17 15:15:16
阅读次数:
180
temppos:记录子字符串开始的下标
list:存放重复的子字符串
public class RepeatString {
private static void longestdupString(String s) {
if (s == null || s.length() == 0) {
return;
}
char temp = s.charAt(0);
...
分类:
其他好文 时间:
2015-01-17 13:57:37
阅读次数:
106
最近浏览记录 private void get_history_log(HttpContext context) { string id = DTRequest.GetFormString("id_arr"); DataTable dt = ...
分类:
Web程序 时间:
2015-01-17 13:52:58
阅读次数:
135