自己练习的源码地址:https://git.oschina.net/snnhoo/DesignPattern.git 欢迎推送第一章 单一职责原则简称SRP:Single Responsibility Principle定义:应该有且仅有一个原因引起类的变更好处:类复杂度降低,职责明确可读性高可维护...
分类:
其他好文 时间:
2015-11-26 01:02:15
阅读次数:
278
原文: WPF:如何实现单实例的应用程序(Single Instance) 好吧,这是我将WPF与Windows Forms进行比较的系列文章的第四篇,讨论一下如何实现单实例(single instance) 先来看第一种最简单粗暴的做法: 检测进程名,如果名称一样,则表示程序已经启动了,就不再启动...
前面介绍了关于压缩感知的一些理论知识,这里介绍压缩感知最简单最开始的应用——单像素相机Single Pixel Camera。 1、单像素相机的模型与结构: 如下图所示: PD是光感器件(即单像素),对应公式中的yi; 场景图像对应公式中的f; DMD是数字微镜阵列,用来生成测量矩阵,每一次对应公式...
分类:
其他好文 时间:
2015-11-25 11:01:30
阅读次数:
206
FROM >dual is a table that contains a single row. The following outputfrom the DESCRIBE command shows the structure of the dual table, along with a qu...
分类:
数据库 时间:
2015-11-24 14:40:43
阅读次数:
207
关于singleTask TaskAffinity allowTaskReparenting一、Activity的LaunchMode1.standard2.singleTop:FLAG_ACTIVITY_SINGLE_TOP 栈顶复用模式,即如果栈顶有本activity实例,则无需新实例化acti...
分类:
其他好文 时间:
2015-11-23 11:42:55
阅读次数:
178
1.1对数据库thunder进行备份mysqldump-S/tmp/mysql3316.sock--single-transaction--master-data=2thunder>thunder_full_2015112.sql1.2进行truncatetable操作并insertintotable(work)root@localhost:mysql3316.sock[(none)]>select*fromthunder.tb1;
+----+---------+
|i..
分类:
数据库 时间:
2015-11-22 23:35:25
阅读次数:
808
1.新建工程名为RotateDemo , File->New->Project ->single View Application -> next2.在view视图上添加两个Label,[cpp]view plaincopy//RotateViewController.h#import@interf...
分类:
其他好文 时间:
2015-11-22 14:01:45
阅读次数:
276
一、firstordefault() 和 first() class Program { static void Main(string[] args) { List list = new List { new E...
分类:
其他好文 时间:
2015-11-20 15:19:22
阅读次数:
153
DataTable dt=...........//获取从数据库中取出的数据(假设只有一条记录)//Cast()用来将非泛型的序列转换为泛型的序列DataRow row=dt.Rows.Cast().Single();//OfType():用来将序列中可以转换的转换为指定的序列如:一个object数...
分类:
其他好文 时间:
2015-11-19 11:09:36
阅读次数:
142
官网进入:http://www.hibernate.org说明文档:英文:http://docs.jboss.org/hibernate/annotations/3.5/reference/en/html_single/中文:http://docs.jboss.org/hibernate/annot...
分类:
Web程序 时间:
2015-11-18 21:10:39
阅读次数:
167