最近在做服务器的高可用性,考虑主从热备初步准备采用keepalive这个工具来完成这个需求,下面主要做了一个keepalive入门实验
?
测试环境
两台centos
1 ...
分类:
其他 时间:
2015-09-08 02:14:42
收藏:
0 评论:
0 赞:
0 阅读:
536
讲到并发就不得不讲一下Executor框架,其框架主要类关系图如下:
?
从图中可以看出来,接口Executor是框架知识点的行引路者,那就从它讲起!
?
?
一:关于Executor的源码
?
/*
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
* Written by Doug Le ...
分类:
其他 时间:
2015-09-08 02:11:47
收藏:
0 评论:
0 赞:
0 阅读:
139
Docker -d -D服务无法启动??? 问题详情显示如下:
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
ERRO[0000] [graphdriver] prior storage driver "devicemapper" failed: Error running DeviceCreate ...
分类:
其他 时间:
2015-09-08 02:10:57
收藏:
0 评论:
0 赞:
0 阅读:
392
Say you have an array for which the?ith?element is the price of a given stock on day?i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one ...
分类:
其他 时间:
2015-09-08 02:10:07
收藏:
0 评论:
0 赞:
0 阅读:
220
Say you have an array for which the?ith?element is the price of a given stock on day?i.
Design an algorithm to find the maximum profit. You may complete at most?two?transactions.
?
public class Sol ...
分类:
其他 时间:
2015-09-08 02:09:42
收藏:
0 评论:
0 赞:
0 阅读:
255
Docker本地私有仓库搭建:
准备两台服务器192.168.10.123,192.168.10.124
?
1.以容器的方式运行registry服务,在123服务器执行
docker?run?-idt?-p?5000:5000?--name?registry?-v?/data/registry:/data/docker/registry?registry
?
启动成功后,使用dock ...
分类:
其他 时间:
2015-09-08 02:07:12
收藏:
0 评论:
0 赞:
0 阅读:
322
mybatis 有时会发生怪异的问题: Invalid bound statement (not found)
?
类似找不到xml文件 或者 找不到接口中对应配置文件的方法
?
解决问题思路:
1.各种配置 、文件名字、路径都正确的情况下 ,尝试清理项目,点eclipse 菜单的project-->clean
?
2.maven 项目 ?xml文件放在 src/main ...
分类:
其他 时间:
2015-09-08 02:07:00
收藏:
0 评论:
0 赞:
0 阅读:
392
Search a 2D Matrix
?
来自 <https://leetcode.com/problems/search-a-2d-matrix/>
Write an efficient algorithm that searches for a value in an?m?x?n?matrix. This matrix has the following propertie ...
分类:
其他 时间:
2015-09-08 02:05:57
收藏:
0 评论:
0 赞:
0 阅读:
291
用Maven来管理代码的依赖包,这种方式还是不错的,jar包的依赖关系及下载都由Maven替我们完成,很方便
?
用Maven构建依赖包的主要步骤:
1.双击Pom.xml
在Dependencies选项卡中点击add,
输入对应信息后点击确定
?
?
2. 切换到Dependencies Hierarchy会发现自动下载了json-lib的依赖包
?
?
?
3. ...
分类:
其他 时间:
2015-09-08 02:05:33
收藏:
0 评论:
0 赞:
0 阅读:
254
Rotate Image
?
?
来自 <https://leetcode.com/problems/rotate-image/>
You are given an?n?x?n?2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could yo ...
分类:
其他 时间:
2015-09-08 02:05:07
收藏:
0 评论:
0 赞:
0 阅读:
284
1.关于list.isEmpty
只要有list.add操作。即使是list.add("") (1次或若干次),list.isEmpty也是返回false; 如果你仅仅是声明一个List,而没有add操作,则li ...
分类:
其他 时间:
2015-09-08 02:04:17
收藏:
0 评论:
0 赞:
0 阅读:
380
条款09:绝不在构造和析构过程中调用virtual函数
? ? 首先看下面一段代码,我们将在基类的构造函数中调用虚函数
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
class base{
public:
base(){
...
分类:
其他 时间:
2015-09-08 02:03:27
收藏:
0 评论:
0 赞:
0 阅读:
240
1.UML:统一建模语言 2.SLC:安全登陆码(Security Login Code) 3.POJO:简单的java对象,实际上就是javaBeans(实体类) 4.JNI:本地化(JVM通过在不同的系统上调用不同的JNI方法来实现java跨平台) 5.JNDI:数据库接口 6....
分类:
其他 时间:
2015-09-08 01:48:37
收藏:
0 评论:
0 赞:
0 阅读:
324
//比如要解析resp.Body(io.ReadCloser),我们可以这样处理
body,?err?:=?ioutil.ReadAll(resp.Body) 接着,我们继续分析分析函数 func?ReadAll(r?io.Reader)?([]byte,?error)?{
return?readAll(r,?byt...
分类:
其他 时间:
2015-09-08 01:48:27
收藏:
0 评论:
0 赞:
0 阅读:
481
将每个学生填写的信息在检查后自动汇总到一个新的excel表格。 #-*-?encoding:?utf-8?-*-
‘‘‘
??小学??学生学籍信息汇总?(带身份证号码有效性检查)
??版权:GPL
??owner:jhonglei@gmail.com
‘‘‘
i...
分类:
其他 时间:
2015-09-08 01:48:17
收藏:
0 评论:
0 赞:
0 阅读:
285
1、软件名称:EditPlus 2、下载地址:https://www.editplus.com/download.html 3、程序版本号:Version 3.80 build 805 4、用户许可协议出现位置: 可以在安装包向导中找到;安装完毕后在“License Agreement”中...
分类:
其他 时间:
2015-09-08 01:47:58
收藏:
0 评论:
0 赞:
0 阅读:
265
在之前的文章说过Activity Monitor,官方解释为:(活动监视器)实时显示CPU、内存和网络的使用情况,记录由虚拟内存大小测量的系统负载。用一句大白话来说,Activity Monitor类似Windows中的任务管理器,可以实时查看进程占用的CPU、内存的使用量。一、Activity M...
分类:
其他 时间:
2015-09-08 01:46:47
收藏:
0 评论:
0 赞:
0 阅读:
616
初学iOS,刚做项目,各种不习惯,需要对知识一点点的总结和积累,今天先从KVC开始。 KVC 即 Key-Vlue coding,键值编码,通过key的方式对对象的属性进行赋值和修改。 上代码 这是最简单kvc使用方式。 subject为student的私有变量,,但是通过kvc可...
分类:
其他 时间:
2015-09-08 01:46:37
收藏:
0 评论:
0 赞:
0 阅读:
184
一、我的构想:如何为编程爱好者设计一款好玩的智能硬件(一)——即插即用、积木化、功能重组的智能硬件模块构想二、别人家的孩子:如何为编程爱好者设计一款好玩的智能硬件(二)——别人是如何设计硬件积木的!三、MCU选型: 搬砖的很勤劳、很努力也很能坚持,但大多数都只是赚血汗钱。我搬过砖,那是在高考完的暑....
分类:
其他 时间:
2015-09-08 01:46:07
收藏:
0 评论:
0 赞:
0 阅读:
388
原文:去掉ILDasm的SuppressIldasmAttribute限制今天本打算汉化一个.Net程序的,当用ILDasm打开的时候,出现了"受保护模块—无法进行反汇编"的错误提示 看到这个错误提示后,便尝试用ILSpy打开,结果一切正常。网上搜了下,原来是SuppressIldasmAttrib...
分类:
其他 时间:
2015-09-08 01:45:57
收藏:
0 评论:
0 赞:
0 阅读:
600