自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 收藏
  • 关注

转载 maven 常用命令

mvn clean package依次执行了clean、resources、compile、testResources、testCompile、test、jar(打包)等7个阶段。mvn clean install依次执行了clean、resources、compile、testResources、testCompile、test、jar(打包)、install等8个阶段。mvn cle...

2019-05-08 16:12:00 78

转载 jar 常用操作

查看 jar 包中的文件列表,并进行重定向jar -tvf a.jar > a.txt 更新文件到 jar 中,目录需对应jar -uf a.jar com/a.classa.class 文件在 jar 包中的目录是 com/a.class。a.class 文件在本地路径,相对 a.jar 包,也是 com/a.class。-rw-r...

2019-04-25 19:21:00 103

转载 linux 加载新的磁盘(卷组)

pvcreate /dev/vdbvgcreate datavg /dev/vdblvcreate -n datalv -L 99.8G datavgmkfs.ext3 /dev/datavg/datalvsed -i '$a /dev/mapper/datavg-datalv /DATA ext3 defaults 0 0' /...

2019-04-01 17:27:00 231

转载 apache 代理配置

apache 2.4.6版本<VirtualHost *:8080> ServerName 21.12.13.146 DocumentRoot /root/gbhu ErrorLog /root/gbhu/log/apache2/error_log CustomLog /root/gbhu/log/apache2/access_log comb...

2019-03-27 16:22:00 128

转载 spring boot datasource 参数设置

datasourcespring.dao.exceptiontranslation.enabled是否开启PersistenceExceptionTranslationPostProcessor,默认为truespring.datasource.abandon-when-percentage-full设定超时被废弃的连接占到多少比例时要被关闭或上报...

2019-03-07 22:35:00 221

转载 svn 常用命令

在使用源代码版本控制工具时,最佳实践是一直保持一个主干版本。但是为了应付实际开发中的各种情况,适时的开辟一些分支也是很有必要的。比如在持续开发新功能的同时,需要发布一个新版本,那么就需要从开发主干中建立一个用于发布的分支,在分支上进行bug fix,维护版本的稳定,并适时的将一些改动合并回主干。目前大红大紫的源代码版本控制工具git很受大家推崇,原因之一就是其在这方面的功能相当强大。其实...

2018-12-03 22:38:00 57

转载 最详细的maven教程

转载 https://blog.csdn.net/wymrdjm/article/details/78695956所有用Maven管理的真实的项目都应该是分模块的,每个模块都对应着一个pom.xml。它们之间通过继承和聚合(也称作多模块,multi-module)相互关联。那么,为什么要这么做呢?我们明明在开发一个项目,划分模块后,导入Eclipse变成了N个项目,这会带来...

2018-10-18 21:52:00 56

转载 centos 用户组操作

adduser testuser//新建testuser 用户passwd testuser//给testuser 用户设置密码useradd-g testgroup testuser//新建testuser用户并增加到testgroup工作组usermod-G groupname username //给已有的用户增加工作组gpasswd -d user...

2018-07-17 09:57:00 54

转载 微信自研生产级paxos类库PhxPaxos实现原理介绍

转载自: http://mp.weixin.qq.com/s?__biz=MzI4NDMyNTU2Mw==&mid=2247483695&idx=1&sn=91ea422913fc62579e020e941d1d059e#rd微信重磅开源生产级paxos类库PhxPaxos,本文用科普的口吻向大家介绍PhxPaxos背后的实现原理以及一些有意思的...

2018-04-28 22:19:00 107

转载 图解分布式一致性协议Paxos

Paxos协议/算法是分布式系统中比较重要的协议,它有多重要呢?<分布式系统的事务处理>:Google Chubby的作者Mike Burrows说过这个世界上只有一种一致性算法,那就是Paxos,其它的算法都是残次品。<大规模分布式存储系统>:理解了这两个分布式协议之后(Paxos/2PC),学习其他分布式协议会变得相当容易。...

2018-04-26 22:55:00 68

转载 Paxos协议超级详细解释+简单实例

转载自: https://blog.csdn.net/cnh294141800/article/details/53768464Paxos协议超级详细解释+简单实例Basic-Paxos算法(可以先看后面的实际例子再看前面的具体介绍部分)Paxos算法的目的Paxos算法的目的是为了解决分布式环境下一致性的问题。 多个节点并发操纵数据,如何保证在...

2018-04-26 22:35:00 148

转载 sql server 日期函数

一、sqlserver日期时间函数SqlServer中的日期与时间函数1.当前系统日期、时间selectgetdate()2.dateadd在向指定日期加上一段时间的基础上,返回新的datetime值例如:向日期加上2天selectdateadd(day,2,'2004-10-15')--返回:2004-10-1700:00:00...

2018-04-12 08:23:00 107

转载 Openssl 加解密文件

使用openssl 的命令行进行文件的加密与解密过程,主要有两种方式:openssl 指定加密/解密算法加密openssl 指定公钥/私钥文件加密openssl 指定加密/解密算法加密To Encrypt:openssl enc -e -aes-256-cbc -in un_encrypted.data -out encrypted.data1...

2018-03-27 22:25:00 141

转载 Centos7安装vim8.0 + YouCompleteMe

更新yumsudo yum upgradesduo yum update下载gitsudo yum install git升级vim以及gcc升级gccsudo yum install centos-release-scl -ysudo yum install devtoolset-3-toolchain -ysudo yum install g...

2018-03-17 21:59:00 140

转载 mac

/***@send_arp.c*@ThissoftwareisintendedtobeusedasaexampletoshowhowtosendandreceivearprequestwithLinux*PF_PACKETinterface*@Author:xuelei**/#inclu...

2017-12-12 23:10:00 93

转载 How long does it take to make a context switch?

FROM:   http://blog.tsunanet.net/2010/11/how-long-does-it-take-to-make-context.htmlThat's a interesting question I'm willing to spend some of my time on. Someone at StumbleUpon emitted the h...

2017-12-09 08:54:00 194

转载 Memory Barriers Are Like Source Control Operations

From: http://preshing.com/20120710/memory-barriers-are-like-source-control-operations/If you use source control, you’re on your way towards understanding memory ordering, an important cons...

2017-11-27 17:43:00 125

转载 An Introduction to Lock-Free Programming

转载自:http://preshing.com/20120612/an-introduction-to-lock-free-programming/#sequential-consistencyLock-free programming is a challenge, not just because of the complexity of the task itself, b...

2017-11-27 17:27:00 185

转载 Acquire and Release Fences

转载自: http://preshing.com/20130922/acquire-and-release-fences/Acquire and release fences, in my opinion, are rather misunderstood on the web right now. That’s too bad, because the C++11 Sta...

2017-11-27 13:56:00 365

转载 常用 git 命令

git diff : compare working directory and staged file ( by git add)git diff --stage: compare staged file with file on the servergit diff HEAD: compare working directory and file on the serve...

2017-11-16 13:27:00 67

转载 vim版本更新

版本问题ubuntu 14.05 安装完YouCompleteMe后不生效,提示:YouCompleteMe unavailable : requires Vim 7.4.143经过检索与查询,ubuntu自带的vim为7.4.50,需要安装最新的vim。在stackoverflow上查到更新方案如下:sudo add-apt-repository ppa:jonathonf...

2017-10-19 22:41:00 185

转载 vim bundle安装

一、准备工作安装Git(因为下面我们选择的插件管理器需要使用到它)安装其他插件前首先需要选择一个Vim插件管理器,我这里选择的是Vundle,Vundle的工作过程中需要通过Git自动从远程创库同步插件安装包到本地仓库(Vundle的默认本地仓库位置是~/.vim/bundle/) 通过Git下载Vundle安装包:$ git clone https://github.com/gma...

2017-08-29 23:17:00 175

转载 emacs 常用命令

C stands for Ctrl and M stands for Alt REFERENCE FORM EMACS TUTORIAL 表述不一定正确,仅供参考,主要是要多实践,一开始可能会不习惯。 PART1CURSOR C+p 光标上移 C+n 光标下移 C+b 光标后移 M+b 光标向前移动一个单词 C+f 光标前移 M+f 光标向后移动一个单词 C+v 向下翻页 M+v 向...

2017-08-25 22:32:00 109

转载 测试sigaction重启动标识

#include <stdio.h>#include <unistd.h>#include <signal.h>#include <string.h>#include <arpa/inet.h>#include <netinet/in.h>#include <sys/types.h>#include &l...

2017-08-24 21:51:00 101

转载 线程绑定

#include<unistd.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include<pthread.h>#include <sched.h>#include<iostream&g...

2017-08-20 22:31:00 146

转载 sysconf获取系统参数

头文件: #include <unistd.h>原型:long sysconf(int sysnum);示例:#include<stdio.h> #include<stdlib.h> #include<unistd.h> intmain() { printf("Sizeofapage...

2017-06-13 19:44:00 133

转载 linux top 命令详解

top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器。下面详细介绍它的使用方法。top - 01:06:48 up 1:22, 1 user, load average: 0.06, 0.60, 0.48Tasks: 29 total, 1 running, 28 sleeping, 0 stopped, 0 zombie...

2017-06-08 14:25:00 123

转载 lua添加自定义模块的步骤

以下方法在lua 5.2.4版本下成功实现:1. lua.c为所有函数的主程序,参考Makefile的编译链接2. lua.c中int main (int argc, char **argv) { … /* call 'pmain' in protected mode */ lua_pushcfunction(L, &pmain); …}static int p...

2017-05-23 09:27:00 657

转载 mysql 加锁处理分析

转载http://blog.csdn.net/opensure/article/details/46227695MySQL 加锁处理分析标签:DatabaseDeadlockLockMySQL2015-05-29 11:141101人阅读评论(0)收藏举报分类:mysql(1)目录(?)[+]1...

2016-12-15 18:48:00 60

转载 DB2 数据库权限

以下内容转载: http://blog.csdn.net/xiyuan1999/article/details/8135263DB2中的权限DB2 中有三种主要的安全机制,可以帮助 DBA 实现数据库安全计划:身份验证(authentication)、授权(authorization)和特权(privilege)。...

2016-12-06 11:16:00 855

转载 fcntl和flock两个系统调用的区别

总的来说,flock函数只能锁定整个文件,无法锁定文件的某一区域。而fcntl可以利用struct flock结构体,来实现文件里部分区域锁定的操作。附:fcntl(文件描述词操作)相关函数 open,flock表头文件 #include<unistd.h>#include<fcntl.h>定义函数 int fcntl(int fd , int cmd);int...

2016-11-02 16:34:00 105

转载 gdb Debug

  源码会进行行号提示。  如果需要查看在其他文件中定义的函数,在l后加上函数名即可定位到这个函数的定义及查看附近的其他源码。或者:使用断点或单步运行,到某个函数处使用s进入这个函数。3)设置断点  (gdb) b 6  这样会在运行到源码第6行时停止,可以查看变量的值、堆栈情况等;这个行号是gdb的行号。4)查看断点处情况  (gdb)info b  可以键入"...

2016-09-29 21:30:00 72

转载 Keepalived 安装

一、首先确保一些核心参数配置正确修改 /etc/sysctl.conf的如下参数:net.ipv4.ip_forward=1net.ipv4.ip_nonlocal_bind = 1net.ipv4.conf.lo.arp_ignore = 1net.ipv4.conf.lo.arp_announce = 2net.ipv4.conf.all.arp_ignore = 1ne...

2016-09-11 22:42:00 63

转载 tcp 出现rst情况整理

正常情况tcp四层握手关闭连接,rst基本都是异常情况,整理如下:1.GFW2. 对方端口未打开,发生在连接建立  如果对方sync_backlog满了的话,sync简单被丢弃,表现为超时,而不会rst3. close Socket 时recv buffer 不为空  例如,客户端发了两个请求,服务器只从buffer 读取第一个请求处理完就关闭连接,tcp层认为...

2016-06-17 23:36:00 261

转载 select示例

#include <sys/select.h>#include <sys/time.h>#include <sys/types.h>#include <unistd.h>int select(int nfds,fd_set * readfds,fd_set * writefds,fd_set * except...

2016-06-06 09:31:00 85

转载 RPC

RPC(远程过程调用)是什么简单的说,RPC就是从一台机器(客户端)上通过参数传递的方式调用另一台机器(服务器)上的一个函数或方法(可以统称为服务)并得到返回的结果。RPC 会隐藏底层的通讯细节(不需要直接处理Socket通讯或Http通讯)RPC 是一个请求响应模型。客户端发起请求,服务器返回响应(类似于Http的工作方式)RPC 在使用形式上像调用本地函数(或方法...

2016-06-04 15:12:00 64

转载 pkg-config

1 pkg-config介绍pkg-config用来检索系统中安装库文件的信息。典型的是用作库的编译和连接。如在Makefile中:program: program.c cc program.c `pkg-config --cflags --libs gnomeui`pkg-config --list-all...

2016-06-04 12:18:00 57

转载 libtool

【从网上摘录的,忘了从哪摘的了】libtool常见于autoconf/automake,单独用的例子很少,所以我想仔细研究一下,为将来兄弟们看起来方便。一。libtool的作用offer a standard procedure for creating shared libraries on different platformslibtool 是一个通用库支持脚本,将使用...

2016-06-04 11:45:00 68

转载 gtest

更通用的做法是:不必在每个平台下分别编译生成静态库,可以直接使用/fused-src/gtest下的gtest.h和gtest-all.cc两个文件,此两个文件包含了所有你需要用到的Google Test的东西。如果没有/fuse-src这个文件,可以使用/scripts/fuse_gtest_files.py这个文件生成,操作步骤是:(1)、配置好python;(2)、打开命令提示符,...

2016-06-04 11:42:00 56

转载 Git

Notes from http://gitref.org/remotes/If you want to share a locally created repository, or you want to take contributions from someone else's repository - if you want to interact in any way ...

2016-06-04 11:28:00 62

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除