摘要: 今天整个上午都在调试一个程序,我就纳了闷了,NND,为什么我明明把ip存进内存 了,重复查询的时候还是去硬盘?调啊调都没看明白,后来一看JDK才明白,娘西皮滴! 原来Hashtable的contains(Object),指的是是否包含value而不是key!!! 竟然和Map的containsV... 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(89) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { File file=new File("image.jpg"); File path=new File("D:/examples"); File tofile=new File(path,"image.jpg")... 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 今天在机子上批量修改文件名,总是有括号,很不爽. 一激动,自己写了两个类,实现了下,拼了个批处理文件,运行run.bat直接可以运行的. BAT_rename.rar (784.3 KB) ... 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(93) 评论(0) 推荐(0) 编辑
摘要: InputStream inStream= ClassLoader.getSystemClassLoader().getResourceAsStream("config.properties");Properties prop=new Properties();prop.load(inStream... 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(106) 评论(0) 推荐(0) 编辑
摘要: •数据库索引: >对数据库表中列的值进行排序的结构。 >索引提供指针指向表中特定列的数据值,再用特定的算法对指针进行排列。•优缺点: >加快访问速度【优点】; >加强行的唯一性【优点】; >带索引的表占用更多的存储空间;... 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 【摘自itpub论坛】“一个具有2行数据的表需要多长时间,他差不多可能也是这个时间…他不太相信,问我原理,我告诉他我理解truncate其实就是更换了一个data segment,其实本质上是修改了数据字典,100g的数据oracle没做任何访问和调整…” 阅读全文
posted @ 2012-12-13 17:21 niewj 阅读(328) 评论(0) 推荐(0) 编辑
摘要: public class PrintMultiplicationTable{/* * 九九乘法表 * 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*... 阅读全文
posted @ 2012-12-13 17:20 niewj 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner;public class PrintDiamond { private int lineSize;//菱形总共占的行数:注:只能是单数! public PrintDiamond(int max){ if(max<0){... 阅读全文
posted @ 2012-12-13 17:20 niewj 阅读(254) 评论(0) 推荐(0) 编辑
摘要: public class IsoscelesTriangle {/** * 等腰三角形 */ public void print1(){//形如 ▲向上的 for(int i=1;i<=5;i++){ for(int k=1;k<=5-i;k++) ... 阅读全文
posted @ 2012-12-13 17:20 niewj 阅读(487) 评论(0) 推荐(0) 编辑
摘要: 1.鼠标MouseListener有三个方法:mouseDown:摁下触发;mouseUp:松开时;mouseDoubleClick:双击时;左中右键都可2.属性:button:int:左=1;中=2;右=3;stateMask:同KeyListener;x,y:摁下处坐标package com.i... 阅读全文
posted @ 2012-06-06 07:13 niewj 阅读(828) 评论(0) 推荐(0) 编辑