加载中
top

1. Oracle数据库 SELECT * FROM TABLE1 WHERE ROWNUM<=N 2.DB2数据库  SELECT * ROW_NUMBER() OVER(ORDER BY COL1 DESC) AS ROWNUM WHERE ROWNUM<=N 3.MySQL数据库  SELECT * FROM TABLE1 ...

2013/10/25 11:14
24
身份证 和 电话号码的验证

//证件号码校验 function isIdentifyNumber(obj,id){ var selectValue = document.getElementById(id).value; //获取select框的值判断选择的类型进行校验 if(selectValue =='01'){ var isID...

2013/07/09 10:16
89
File的一些小工具

package com.sinosoft.core.common.util.authority; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; i...

2013/07/09 09:43
132
数字格式化DecimalFormat 总结

import java.text.DecimalFormat; public class test { /** * @param args */ public static void main(String[] args) { double d = 1231423.3823; System.out.println("格式化前:"+d); D...

2013/05/30 14:01
97
内部类List排序

List<A> as = new ArrayList<A>(); Collections.sort(as,new Comparator<A>() { public int compare( A arg0, A arg1) { return arg0. getId().compareTo(arg1. getId()); } });...

2013/05/24 17:57
132
[Java]读取文件方法大全

public class ReadFromFile { /** * 以字节为单位读取文件,常用于读二进制文件,如图片、声音、影像等文件。 */ public static void readFileByBytes(String fileName) { File file = new F...

2013/05/09 15:46
36
[Java]HashMap的两种排序方式

Map < String, Integer > map = new HashMap < String, Integer > (); map.put( " d " , 2 ); map.put( " c " , 1 ); map.put( " b " , 1 ); map.put( " a " , 3 ); List < Map.Entry < Stri...

2013/05/09 15:44
73
MySQL的replace()函数

今天在工作的过程中碰到一个问题,要把数据库中某个列的所有值中含有"shop.xxxx.net"的字符更换成"www.nowamagic.net",本来可以写个脚本,把所有的值都取出再用php进行处理,但是那样就效率...

2013/05/07 17:58
218
JAVA日期加减运算

1.用java.util.Calender来实现 Calendar calendar=Calendar.getInstance(); calendar.setTime(new Date()); System.out.println(calendar.get(Calendar.DAY_OF_MONTH));//今天的日期 calend...

2013/04/28 12:18
932
Collections 最大值,最小值

for(RoomBillSysRoomCrmGuest roomBillSysRoomCrmGuest : roomBillSysRoomCrmGuests){ Date inDate = roomBillSysRoomCrmGuest.getCheckInTime(); checkInTimes.add(inDate.getTime()); Date...

2013/04/26 11:09
58
//Date或者String转化为时间戳

//Date或者String转化为时间戳 SimpleDateFormat format = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " ); String time=" 1970-01-06 11:45:55 ";//注:改正后这里前后也加了空格 Date d...

2013/04/26 10:13
171
Unix时间戳(Unix timestamp) → 北京时间

如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)? Java time JavaScript Math.round(new Date().getTime()/1000) getTime()返回数值的单位是毫秒 Microsoft .NET / C# epoch = ...

2013/04/26 10:05
327
for 循环 里面 save 的问题

界面往后台传回两个对象:一个 ArrayList<A>() 、一个B。到service 时, ss = ArrayList<A>(); b =B; for(A a : ss){ 字段 x =a .getX(); //从a中获得字段x b.setX(x); //把x set到B中 b.sa...

Set和List如何转换

★ 数组转Collection 使用Apache Jakarta Commons Collections: import org.apache.commons.collections.CollectionUtils; String[] strArray = {"aaa", "bbb", "ccc"}; List strList = new...

2013/04/23 15:23
51
UML建模之时序图

一、时序图简介(Brief introduction) 二、时序图元素(Sequence Diagram Elements) 角色(Actor) 对象(Object) 生命线(Lifeline) 控制焦点(Focus of Control) 消息(Message) 自关...

2013/04/23 15:07
679
UML类图几种关系的总结

在UML类图中,常见的有以下几种关系: 泛化(Generalization), 实现(Realization),关联(Association),聚合(Aggregation),组合(Composition),依赖(Dependency) 1. 泛化(Generalizat...

2013/04/23 15:04
44
BigDecimal 函数

1 public BigDecimal(double val) 构造将double表示形式转换为BigDecimal 2 public BigDecimal(int val)构造将int表示形式转换为BigDecimal 3 public BigDecimal(String val)构造将字符串表示...

2013/04/22 15:56
49
mybatis

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <mapper namespace="com.bjsci...

2013/04/18 09:18
51
2,5,10,17, ,37

2,5,10,17, ,37 0,6,6,20, ,12 2,10,30,68, ,222 1,11,21,1211,111221, 5,15,215,2145,

2013/04/17 15:42
50

没有更多内容

加载失败,请刷新页面

返回顶部
顶部