在构建应用程序时,需要实现唯一实例化对象的类,并提供该实例的全局访问入口,以性能和框架能力为前提,还要考虑线程安全。单件模式实现方式之一:简单实现,存在线程安全问题。 public sealed class Singleton { private static Single...
分类:
其他好文 时间:
2015-04-22 23:31:14
阅读次数:
147
'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input string (not partial).The...
分类:
其他好文 时间:
2015-04-22 20:34:04
阅读次数:
122
原图:效果1:效果2:
效果3:效果4:
查看官方的API,其中ColorMatrix的说明如下:
5x4 matrix for transforming the color+alpha components of a Bitmap. The matrix is stored in a single array, and its
treated as fo...
分类:
移动开发 时间:
2015-04-22 13:52:10
阅读次数:
267
参考链接http://jingyan.baidu.com/article/2a138328bd73f2074b134f6d.htmlXcode 6 正式版如何创建一个Empty Application本文介绍在Xcode 6正式版,如何将一个Single View Application变为你熟悉的...
分类:
移动开发 时间:
2015-04-22 09:29:14
阅读次数:
135
master-detail Application主应用程序page-based Application基于页面的应用Single View Application单视图中的应用Tabbed Application标签中的应用cocoa Touch FrameworkCocoa Touch框架Coc...
分类:
其他好文 时间:
2015-04-22 01:58:03
阅读次数:
147
typeof 判断6种1 //typeof 6种2 console.log(typeof 1); //number3 console.log(typeof ''); //string4 console.log(typeof true); ...
分类:
编程语言 时间:
2015-04-22 00:05:02
阅读次数:
148
题目:
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire...
分类:
其他好文 时间:
2015-04-21 22:49:16
阅读次数:
168
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2015-04-21 22:22:16
阅读次数:
128
Problem AAlmost Prime NumbersTime Limit: 1 secondAlmost prime numbers are the non-prime numbers which are divisible by only a single prime number. In ...
分类:
其他好文 时间:
2015-04-21 20:42:15
阅读次数:
104
Xcode6 国际化(1) 新建一个Single View app模版项目,命名为LocalizationTest1、建立strings文件,命名为Localization.strings2、点击刚刚创建的Localization.strings文件,展开右侧栏,点击Localizations按钮3...
分类:
其他好文 时间:
2015-04-21 20:09:47
阅读次数:
124