This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* | |
* @author Leon | |
* | |
* @param <T> | |
*/ | |
public class TestDao<T> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.micmiu.demo.web.v1.utils; | |
import java.io.IOException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import org.codehaus.jackson.JsonGenerator; | |
import org.codehaus.jackson.JsonProcessingException; | |
import org.codehaus.jackson.map.JsonSerializer; | |
import org.codehaus.jackson.map.SerializerProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 返回json格式为: | |
* {"total":"2","rows":[{"id":"142318","firstname":"kkk","lastname":"Popoviceww","phone":"l","email":"dfgd@te.com"},{"id":"142322","firstname":"Hello","lastname":"there","phone":"","email":""}]} | |
*/ | |
@RequestMapping("doGetEmpList") | |
@ResponseBody | |
public Map<String, Object> doGetEmpList(){ | |
List<DrdgEmp> modelList = drdgEmpService.selectModelList(); | |
//获得的list集合装填到map集合 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class XiaoFuNumberGetOne { | |
/** | |
* @param args | |
* | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
int num = 112,saveNum = 1,countNum = 0,lastNum=0,numCopy = num; | |
while(num!=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>json</title> | |
<script language="javascript" type="text/javascript"> | |
window.onload = function(){ | |
// 遍历数组对象 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.drdg.test; | |
import java.lang.reflect.Method; | |
public class TestReflect { | |
public static void main(String[] args) throws Exception { | |
System.out.println("获取类下的所有方法:\r\n"); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--rowid分页,第一步 | |
select rowid rid,sal from emp order by sal desc; | |
--rowid分页,第二步 | |
select rownum rn,rid from(select rowid rid,sal from emp order by sal desc) where rownum<10; | |
--rowid分页,第三步 | |
select rid from(select rownum rn,rid from(select rowid rid,sal from emp order by sal desc) where rownum<10) where rn>5; | |
--rowid分页,第四步 | |
select * from emp where rowid in(select rid from(select rownum rn,rid from(select rowid rid,sal from emp order by sal desc) where rownum<10) where rn>5); | |
**************************************************** |