摘要: 双重锁机制namespace Singleton { public class Singleton { //定义一个私有的静态全局变量来保存该类的唯一实例 private static Singleton singleton; //定义一个只读静态对象 ... 阅读全文
posted @ 2013-05-11 16:09 顿金 阅读(175) 评论(0) 推荐(0) 编辑
摘要: select * from a,b where a.id=b.id(+);--该写法的执行效率高select * from a left join b on a.id=b.id; 阅读全文
posted @ 2013-05-11 15:50 顿金 阅读(2247) 评论(0) 推荐(0) 编辑
摘要: 设计模式分为三种类型,共23类。创建型模式:单例模式、抽象工厂模式、建造者模式、工厂模式、原型模式。结构型模式:适配器模式、桥接模式、装饰模式、组合模式、外观模式、享元模式、代理模式。行为型模式:模版方法模式、命令模式、迭代器模式、观察者模式、中介者模式、备忘录模式、解释器模式、状态模式、策略模式、... 阅读全文
posted @ 2013-05-11 15:45 顿金 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 数据库的随机查询SQL1. Oracle,随机查询20条select * from(select * from 表名order by dbms_random.value)where rownum <= 20;2.MS SQL Server,随机查询20条select top 20* from 表名o... 阅读全文
posted @ 2013-05-11 15:41 顿金 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include void bubbleSort(intarr[],intcount){ inti = count, j; inttemp; while(i > 0) { for(j = 0; j arr[j + 1]) { temp = arr[j]; ... 阅读全文
posted @ 2013-05-11 15:34 顿金 阅读(165) 评论(0) 推荐(0) 编辑
摘要: usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingNPOI.SS.UserModel;usingSystem.IO;usingSystem.Data;usingNPOI.HSSF.Us... 阅读全文
posted @ 2013-05-11 15:00 顿金 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Connection 物件 Connection 对象主要是开启程序和数据库之间的连结。没有利用连结对象将数据库打开,是无法从数据库中取得数据的。这个物件在ADO.NET的最底层,我们可以自己产生这个对象,或是由其它的对象自动产生。Command 物件 Command 对象主要可以用来对数据库发出一... 阅读全文
posted @ 2013-05-11 14:23 顿金 阅读(107) 评论(0) 推荐(0) 编辑