Redis高可用部署及监控目录一、Redis
Sentinel简介二、硬件需求三、拓扑结构1、单M-S结构2、双M-S结构3、优劣对比四、配置部署1、Redis配置2、Redis
Sentinel配置3、启动服务4、故障模拟检测五、备份恢复1、备份策略2、灾难恢复六、运维监控1、安全监控2、性能监控...
分类:
其他好文 时间:
2014-05-23 04:05:34
阅读次数:
523
有一道这样的面试题:开启一个子线程和主线程同时运行,子线程输出10次后接着主线程输出100次,如此反复50次。先看下面代码:package com.maso.test;
/**
*
* @author Administrator
* 两个线程,其中是一个主线程,第一个线程先运行输出10次,主线程接着运行输出100次,如此反复50次
*/
public class ThreadTest3...
分类:
移动开发 时间:
2014-05-23 00:57:26
阅读次数:
368
【题目】
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant space.
【题意】
给定一个数组,找出第一个缺失的正数。时间复杂度O(n)
...
分类:
其他好文 时间:
2014-05-21 17:13:07
阅读次数:
219
【题目】
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used once in the combination.
Note:
All numbers (including target) will be ...
分类:
其他好文 时间:
2014-05-21 15:55:25
阅读次数:
259
这一篇文章专门整理一下研究过的Android面试题,内容会随着学习不断的增加,如果答案有错误,希望大家可以指正
1.简述Activity的生命周期
当Activity开始启动的时候,首先调用onCreate(),onStart(),onResume()方法,此时Activity对用户来说,是可见的状态
当Activity从可见状态变为被Dialog遮挡的状态的时候,会调用on...
分类:
移动开发 时间:
2014-05-21 15:43:02
阅读次数:
333
【题目】
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited number of times.
Note:
All numbers (including target) w...
分类:
其他好文 时间:
2014-05-21 15:21:28
阅读次数:
292
【题目】
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
Given an integer n, generate...
分类:
其他好文 时间:
2014-05-21 15:20:07
阅读次数:
213
【题目】
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
【题意】
给定用字符串表示的整数,返回两个数的乘积结果字符串。两个数字都非负,且能任意大。
【思路】
1. 考虑其中一个数是0的情况
2. 模拟乘法运算...
分类:
其他好文 时间:
2014-05-21 13:45:37
阅读次数:
214
从零开始学习Linux,正在跟马哥的视频学习。为了加深记忆,方便日后查询,对知识点做个总结。要更好的实现自动化运维,必须熟练使用Linux命令。但是命令繁多,不常用的会忘记。这样就需要使用命令帮助了。可以通过下面6种方法获取命令帮助:No.说明使用方法1查看命令手册#manCO..
分类:
系统相关 时间:
2014-05-21 13:19:19
阅读次数:
440
【题目】
有很多无序的数,从中找出最大的K个数。假定他们都不相等。
【解法一】
如果数据不是很多,例如在几千个左右,我们可以排一下序,从中找出最大的K个数。排序可以选择快速排序或者堆排序
[cpp] view
plaincopy
#include
#include
int cmp(const void *a,const ...
分类:
其他好文 时间:
2014-05-21 07:30:07
阅读次数:
234