- 博客(10)
- 收藏
- 关注
原创 冒泡排序,快速排序
[code="java"]public class TestSort { public static void main(String[] args) { int nums[] = { 7, 5, 3, 8, 4, 6, 1, 2 }; // bubbleSort(nums); quickSort(nums, 0, nums.le...
2016-03-09 11:16:06
75
原创 SQL语句
从表A查询出第30到第39条记录[code="sql"]select top 10 * from (select top 39 * from A order by id asc) t order by id descselect top 10 * from A where id not in (select top 30 id from A order by id asc) order...
2012-06-20 16:27:53
59
原创 JS常用函数
[code="js"]/**----------去除字符串2端空格----------*/function trim(str){ return str.replace(/(^\s*)|(\s*$)/g,""); }/**------判断str里面是否包含substr------*/function contains(str,substr,isIgnoreCase){...
2012-06-15 10:13:34
69
原创 JS导出table到excel
[code="js"]function exportExcel(){ try { var table=document.all("table"); var oXL = new ActiveXObject("Excel.Application"); var oSheet=oXL.Workbooks.Add().Acti...
2012-06-15 10:13:24
113
原创 Oracle常用命令
[code="sql"]/*创建表空间*/create tablespace test_data datafile'e:\oracle\product\10.1.0\oradata\orcl\test_data.dbf' size 100m uniform size 128k;/*更改表空间大小*/alter database datafile 'e:\oracle\product\1...
2012-06-15 10:13:14
52
原创 Ajax中文参数乱码
Ajax发送端应该把包含有中文参数的url编码2次如下var url="savePoints.jsp?test=......... url=encodeURI(encodeURI(url)); //一定要是2层编码String info = java.net.URLDecoder.decode(request.getParameter("test"),"utf-8"); //actio...
2012-06-15 10:13:05
79
原创 递归列出所有子目录和文件
[code="java"]import java.io.File;public class Test { public static void main(String args[]){ try { listFile("E:",0); } catch (Exception e) { e.printSta...
2012-06-15 10:12:55
537
原创 正则表达式
[code="java"]public static boolean validateEmail(String address){ String pattern = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"; return Pattern.compi...
2012-06-14 21:23:59
50
原创 内部类全路径
内部类全路径: org.example.test.A$B 而不是 org.example.test.A.B 试着打印下 B.class 吧[code="java"]import org.example.testpublic class A{ public class B{}}[/code]
2012-06-14 21:23:27
778
原创 关机重启代码
[code="android"]AndroidManifest.xml 加上权限代码关机:Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);intent.setFlags(Intent.FLAG_ACTIV...
2012-06-14 21:22:28
158
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人