Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-09-04 16:41:59
阅读次数:
173
摘自维基百科:分布式系统中的节点通信存在两种模型:共享内存(Shared memory)和消息传递(Messages passing)。基于消息传递通信模型的分布式系统,不可避免的会发生以下错误:进程可能会慢、垮、重启,消息可能会延迟、丢失、重复,在基础 Paxos 场景中,先不考虑可能出现消息篡改...
分类:
其他好文 时间:
2014-09-03 14:41:06
阅读次数:
196
transient和volatile两个关键字一个用于对象序列化,一个用于线程同步,都是Java中比较高阶的话题,简单总结一下。transienttransient是类型修饰符,只能用来修饰字段。在对象序列化的过程中,标记为transient的变量不会被序列化。示例:class Test {tran...
分类:
编程语言 时间:
2014-09-03 09:30:26
阅读次数:
209
代码:(function ($) { "use strict"; $.fn.pin = function (options) { var scrollY = 0, elements = [], disabled = false, $window = $(window); ...
分类:
Web程序 时间:
2014-09-02 22:38:25
阅读次数:
273
引言 快排采用分治法(Divide and Conquer)把一个list分为两个sub-lists。 算法步骤 1. 从数列中跳出一个元素,作为基准(pivot)。 2. 重新排序数列,所有比基准值小的元素(elements pivot)放在基准值后面,与基准值相等的数可以放在任意一边。此操作即为...
分类:
其他好文 时间:
2014-09-02 22:36:25
阅读次数:
298
在这个选项上什么时候选哪个?如果选择use MFC in a Shared DLL 的话,你编译后的程序中不包含MFC库,所以文件会比较小,但是如果你的程序直接移到一个没有安装过MFC的机器上时,可能会导致找不到MFC的DLL。如果选择Use MFC in a Static Library ,那你编...
分类:
其他好文 时间:
2014-09-02 19:22:45
阅读次数:
163
Sequential consistency is one of the consistency models used in the domain of concurrent
computing (e.g. in distributed shared memory, distributed
transactions, etc.).
It was first defined as t...
分类:
其他好文 时间:
2014-09-02 15:54:44
阅读次数:
172
背景项目中使用protobuf作为网络传输协议,最开始在项目中直接使用源代码编译,在真机上测试一直是正常的,直到某天开始在CPU是64 bit的设备上发现protobuf导致crash了,于是就开始尝试使用.a静态库看看是否能解决问题(失败了)。bug解决方案直接看最后。 开发环境OS X 10.....
分类:
其他好文 时间:
2014-09-02 14:08:24
阅读次数:
235
1.Language Architecture 2.User Interface Elements That Consume User ResourcesThe SharePoint Foundation object model has six classes that have propert....
分类:
其他好文 时间:
2014-09-02 14:01:54
阅读次数:
371
LeetCode: SubsetsGiven a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The soluti...
分类:
其他好文 时间:
2014-08-31 22:53:32
阅读次数:
250