leetCode-002 Median of Two Sorted Arrays
【题目】
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
【题意】
有两个有序的数组,找出这两数组整合后的中位数,要求时间复杂度O(nlogn)...
分类:
其他好文 时间:
2014-05-15 04:42:05
阅读次数:
274
1、Replicator执行代码详细分析
上篇问中介绍了启动Replicator的具体过程,下面具体讲解Replicator的执行代码的具体实现:
def replicate(self, override_devices=None, override_partitions=None):
"""Run a replication pass"""
sel...
分类:
其他好文 时间:
2014-05-15 00:15:16
阅读次数:
458
vi/etc/sysconfig/network-scripts/ifcfg-eth0ONBOOT=no改成ONBOOT=no然后重启网络service
network restart
分类:
其他好文 时间:
2014-05-14 22:24:24
阅读次数:
251
Pat1043代码题目描述:A Binary Search Tree (BST) is
recursively defined as a binary tree which has the following properties:The left
subtree of a node contain...
分类:
其他好文 时间:
2014-05-14 22:03:25
阅读次数:
487
ReduceTask的运行
Reduce处理程序中需要执行三个类型的处理,
1.copy,从各map中copy数据过来
2.sort,对数据进行排序操作。
3.reduce,执行业务逻辑的处理。
ReduceTask的运行也是通过run方法开始,
通过mapreduce.job.reduce.shuffle.consumer.plugin.class配置shuffle的plugin,
...
分类:
其他好文 时间:
2014-05-14 20:23:57
阅读次数:
519
Centos下Zabbix_Server/agent/proxy的安装配置--------源码编译完整版请查看附件一、环境说明a)软件环境由于是源码安装,官方的zabbix源码包内已经包含了Server,Proxy,Agent,GUI所有组件和必要的执行脚本,截至本文正式版本限于2.2.3;LAMP环境n操作系统使用Centos6.5X86_64最..
分类:
系统相关 时间:
2014-05-14 18:55:40
阅读次数:
724
{
"cmd":["g++","${file}","-o","${file_path}/${file_base_name}"],
"file_regex":"^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
"working_dir":"${file_path}",
"selector":"source.c,source.c++",
"encoding":"cp936",
"variants":
[
{
"name":"Run",
"shell":true,
"cmd":["st..
分类:
编程语言 时间:
2014-05-14 17:25:25
阅读次数:
300
如何才能学好Linux运维学习运维需要计算机基础,版本的选择我选择:centos学习Linux运维四项基本原则需要刻苦勤奋,持之以恒 入门比较难Linux运维需要很多的知识,不但学习Linux操作本身还得学好周边的知识。学好Linux运维四要素:1.设定目标,是学好Linux运维的关键所在2..
分类:
其他好文 时间:
2014-05-14 16:59:49
阅读次数:
331
CentOS下配置安装Nagios一、Nagios简介Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知..
分类:
移动开发 时间:
2014-05-14 16:00:17
阅读次数:
443
MapTask运行通过执行.run方法:
1.生成TaskAttemptContextImpl实例,此实例中的Configuration就是job本身。
2.得到用户定义的Mapper实现类,也就是map函数的类。
3.得到InputFormat实现类。
4.得到当前task对应的InputSplit.
5.通过InputFormat,得到对应的RecordReader。
6.生成Re...
分类:
其他好文 时间:
2014-05-14 14:31:59
阅读次数:
381