importjava.util.concurrent.locks.Lock;importjava.util.concurrent.locks.ReentrantLock;publicclassSingleton4{ privateSingleton4(){}; privatestaticSingleton4single=null; privatestaticLocklock=newReentrantLock(); publicstaticSingleton4getInstance(){ if(single..
分类:
编程语言 时间:
2014-12-19 19:17:38
阅读次数:
197
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using ext...
分类:
其他好文 时间:
2014-12-19 19:14:19
阅读次数:
141
Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e...
分类:
其他好文 时间:
2014-12-19 00:22:53
阅读次数:
185
概念:
单例模式确保某个类只有一个实例,而且自行实例化并向整个系统提供这个实例。
单例模式有以下特点:
1.单例类只能有一个实例
2.单例类必须自己给自己创建自己的唯一实例
3.单例类必须给所有其他对象提供这一实例
饿汉式:
/*饿汉式*/
class Single
{
private static final Single s = new Sing...
分类:
编程语言 时间:
2014-12-18 16:59:42
阅读次数:
173
分区表有很多好处,以大化小,一小化了,加上并行的使用,在loap中能往往能提高几十倍甚至几百倍的效果。当然表设计得不好也会适得其反,效果比普通表跟糟糕。
为了更好的使用分区表,这里看一下分区表的执行计划。
PARTITION RANGE ALL:扫描所有分区
PARTITION RANGE ITERATOR:扫描多个分区,小于所有个分区数量
PARTITION RANGE SINGLE:扫描单一的...
分类:
数据库 时间:
2014-12-18 10:27:27
阅读次数:
229
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without usi...
分类:
其他好文 时间:
2014-12-17 22:45:19
阅读次数:
215
分类:技术积累2010-08-25 21:4644437人阅读评论(24)收藏举报sso存储tokenmemcachedflash加密单点登录SSO(Single Sign On)说得简单点就是在一个多系统共存的环境下,用户在一处登录后,就不用在其他系统中登录,也就是用户的一次登录能得到其他所有系统...
分类:
其他好文 时间:
2014-12-17 22:17:24
阅读次数:
183
Here's how to save a web page as a single file (mht format) using Delphi code:uses CDO_TLB, ADODB_TLB;...PRocedure WB_SaveAs_MHT(WB: TWebBrowser; File...
Hibernate Annotations
Mapping composite primary keys and foreign keys to composite primary keys:
http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/#d0e2177
引用Composit...
分类:
Web程序 时间:
2014-12-17 16:35:02
阅读次数:
311
参考资料:
Find和FirstOrDefault()有什么区别?
First,FirstOrDefault,Single,SingleOrDefault的区别
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace List泛型集合
{...
分类:
其他好文 时间:
2014-12-16 17:07:43
阅读次数:
193