码迷,mamicode.com
首页 >  
搜索关键字:single    ( 5020个结果
[LeetCode][JavaScript]Single Number III
Single Number IIIGiven an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find t...
分类:编程语言   时间:2015-08-28 02:04:11    阅读次数:135
[LeetCode#260]Single Number III
Problem:Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two el...
分类:其他好文   时间:2015-08-28 00:29:40    阅读次数:255
mongodb
批量插入: var single={.. "name": "jack",.. "password": "12345",.. "age": 20,.. "address": {.. "province:": "hefei".. },.. ...
分类:数据库   时间:2015-08-27 18:27:16    阅读次数:170
说说C#中的enum吧
enum,就是枚举类型,它是struct,int,single,double一样,都属于值类型,从ValueType类型中派生,存储在栈中。它在被创建时,不需要分配内在空间,所以对程序的性能是有好处的。为啥要引入enum呢?一个原因,就是让程序更加安全,添加程序的可读性,提高开发的效率。啥时用呢?当...
分类:编程语言   时间:2015-08-27 18:24:09    阅读次数:204
JsonException: Max allowed object depth reached while trying to export from type System.Single
在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type System.Single。ok,实际上是类的属性中有json不能识别的数据类型.JsonData ...
分类:Web程序   时间:2015-08-27 18:11:51    阅读次数:928
设计模式中的一些设计原则
七大著名设计原则1.单一职责原则(SRP - Single Responsibility Principle) 就一个类而言,应该仅有一个引起它变化的原因,功能要单一 如果一个类承担的职责过多,就等于把这些职责耦合在一起,一个职责的变化可能会削弱或者抑制这个类完成其他职责的能力,这种耦合会导致脆弱的...
分类:其他好文   时间:2015-08-27 14:48:25    阅读次数:190
Mysql备份还原命令
1.全备mysqldump-uroot-padmin--single-transaction--events--triggers--routines--all-databases>all-databases-`date+%F`.sql2.全备还原sourceall-databases-`date+%F`.sql3.分库备mysqldump-uroot-padmin--single-transaction--events--triggers--routines--databasestes..
分类:数据库   时间:2015-08-26 20:22:31    阅读次数:213
我也来刷LeetCode——1、Single Number
这道题目的意思大概是这样: 给我一个整型数组,里面的元素都出现两次,但是有一个元素只出现一次,你要把这个只出现一次的元素给找出来。并且要求算法的时间复杂度为线性,即O(N)。 一开始我思考了很久,始终没有找到方法。若是不限定元素类型为整型,那么根本不可能在线性时间内找到这个只出现一次的元素。...
分类:其他好文   时间:2015-08-26 19:40:03    阅读次数:181
单例模式
//线程不安全的单例模式 public class Singleton { private static Singleton singleton = null; public static Singleton Single { get { if (singleton ==...
分类:其他好文   时间:2015-08-26 19:29:43    阅读次数:131
java.util.concurrent.Callable
/** * A task that returns a result and may throw an exception. * Implementors define a single method with no arguments called * {@code call}. * * <p>The {@code Callable} interface is similar t...
分类:编程语言   时间:2015-08-26 15:59:40    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!