如果用in是字符串类型无问题,可以直接这样用 var result = SNFService.Instance.ModuleService.GetList(UserInfo).Where(entity => entity.DeletionStateCode == 0 ...
分类:
其他好文 时间:
2014-11-14 23:59:04
阅读次数:
404
namespace DesignPattern.Creational.Singleton{ public class Singleton { private Singleton() { } private static Singleton _instance;...
分类:
其他好文 时间:
2014-11-14 19:34:09
阅读次数:
119
1.No suitable driver found for http://127.0.0.1:3306/test jdbc_url错误,jdbc走自己的协议。 正确的路径应该是:jdbc:mysql://127.0.0.1:3306/test。2. mysql中database、instance、...
分类:
数据库 时间:
2014-11-14 19:33:44
阅读次数:
216
服务器程序里很多时候都需要使用单例,目前我使用有两种方式:
方式一:
static CWanClient& Instance()
{
static CWanClient m_cWanClient;
return m_cWanClient;
}
静态成员方式调用,看上去也没什么问题
方式二:
/*
* 使用的时候只需要单件类继承此模板即可。
* class ...
分类:
其他好文 时间:
2014-11-14 14:15:20
阅读次数:
137
loadhibernate.cfg.xml出现了问题获取配置信息代码应该这样写Configuration conf = new Configuration().configure();2009.8.31 更新.An AnnotationConfiguration instance is requir...
分类:
Web程序 时间:
2014-11-14 12:09:18
阅读次数:
114
第十章 类、对象与实现
万物都是容器,容器的符号是U;对象就是单个容器的别名。一切皆对象,具有某些相同属性特征的对象归纳成类。对象(Object)是类(Class)的一个实例(Instance);类是对象的模板。如果将对象比作房子,那么类就是房子的蓝图。我们以自然语言去描述世界,而计算机是用各种数据结构去描述世界;数据可以用x个二进制位的位容器BUx来表示。对象具有状态...
分类:
其他好文 时间:
2014-11-13 22:31:38
阅读次数:
319
1、懒汉式(线程不安全)
public class Singleton {
private static Singleton instance;
private Singleton (){}
public static Singleton getInstance() {
if (instance == null) {
instance = new Sing...
分类:
其他好文 时间:
2014-11-13 16:44:23
阅读次数:
148
SQL> startup mount; ORACLE instance started.Total System Global Area 422670336 bytes Fixed Size1336960 bytes Variable Size314575232 bytes Database Buf...
分类:
其他好文 时间:
2014-11-13 14:29:16
阅读次数:
166
1.。。。identifier of an instance of org.szgzw.ent.profile.baseinfo.enterprise.EnterpriseEntity was altered from 2c90e4da49514c750149515eb56f0003 to undefined; nested exception is org.hibernate.Hibernate...
分类:
编程语言 时间:
2014-11-12 19:44:45
阅读次数:
221
有时候我们遇到如下错误:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [5685940], [0], [5685970], [4194432], [], [], [], [], [], []
Process I...
分类:
其他好文 时间:
2014-11-11 12:43:16
阅读次数:
264