本来以为这题能用并查集做的,但一想不对例如A-> B,A->C如果用并查集的话B与C就不能连了,但实际B可以是C的徒弟,所以这题是考拓扑排序。#include#includeint d[105],map[105][105],vis[105];int main(){ int i,j,k,f,n,...
分类:
其他好文 时间:
2014-07-07 18:32:26
阅读次数:
176
chromium multi-process architecture 本文档从high-level的角度描述Chromium的多进程架构。 问题 要构建一个决不崩溃或挂起的渲染引擎几乎是不可能的。同样的,要构建一个100%安全的渲染引擎也是不可能的。 从某些角度来看,当今的web浏览器有点类似于过...
分类:
其他好文 时间:
2014-07-07 17:06:15
阅读次数:
284
代码:importrandomimportstringimporttime#strong.high=3#randomforthewholepasswd#storng.middle=2#includeonespecialsign#strong.ow=1#justincludecharactersord...
分类:
编程语言 时间:
2014-07-07 14:28:38
阅读次数:
186
var indexOfSorted = function f(arr,n){
//assume : arr has been sorted
var low = 0;
var high = arr.length - 1;
var mid = (low + high) / 2;
while(high - low > 1){
if(n == arr[low]){return low...
分类:
Web程序 时间:
2014-06-30 08:54:10
阅读次数:
978
Iterative ways: 1 int binarySearch (int[] a, int x) { 2 int low = 0; 3 int high = a.length - 1; 4 int mid; 5 6 while (low x) {12 ...
分类:
其他好文 时间:
2014-06-27 22:27:06
阅读次数:
361
App icon57*57 (iPhone, =iOS 7.0, standard resolution)120*120 (iPhone, >=iOS 7.0, high resolution)72*72 (iPad, =iOS 7.0, standard resolution)1...
分类:
移动开发 时间:
2014-06-27 18:36:59
阅读次数:
209
JavaScript 数据访问(通译自High Performance Javascript 第二章)提问者:lilei335260(ID:160310)|悬赏 0.0希赛币 |回答数:12|关注度:32|提问时间:2014-05-03JavaScript 数据访问(翻译自High Performa...
分类:
编程语言 时间:
2014-06-27 15:19:10
阅读次数:
382
1、错误描述
六月 26, 2014 10:44:49 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error
严重: Template processing error: "The only legal comparisons are between two numbers, two strings, or two dates.\nLeft...
分类:
其他好文 时间:
2014-06-27 07:21:12
阅读次数:
196
/*二分查找的递归与非递归算法*/#include #include using namespace std;bool bisrch( int low,int high,int v,int *text ) //递归写法{ int i,mid; mid=( low+high )/2; ...
分类:
其他好文 时间:
2014-06-25 13:51:56
阅读次数:
174
本文详细讲解了Spark在Standalone模式下的Master的HA的源码分析。
为了解决Standalone模式下的Master的SPOF,Spark采用了ZooKeeper提供的选举功能。Spark并没有采用ZooKeeper原生的Java API,而是采用了Curator,一个对ZooKeeper进行了封装的框架。采用了Curator后,Spark不用管理与ZooKeeper的连接,这些对于Spark来说都是透明的。Spark仅仅使用了100行代码,就实现了Master的HA。当然了,Spark是...
分类:
其他好文 时间:
2014-06-25 07:59:09
阅读次数:
183