<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[HelloCooper的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/hellocooper</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; hellocooper]]></copyright><item><title><![CDATA[Docker安装及使用]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/74060296</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/74060296</guid><author>hellocooper</author><pubDate>Sat, 01 Jul 2017 14:19:39 +0800</pubDate><description><![CDATA[安装及使用Docker安装dockeryum install docker 
systemctl enable docker 
systemctl start docker 
sudo usermod -aG docker cooperpull镜像docker run hello-world 
docker pull centos 
docker pull centos:7.2.1511images]]></description><category></category></item><item><title><![CDATA[KVM安装及使用]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/74059076</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/74059076</guid><author>hellocooper</author><pubDate>Sat, 01 Jul 2017 14:03:37 +0800</pubDate><description><![CDATA[本文介绍在CentOS 7.2系统环境的KVM安装及使用，包括NAT网络配置和磁盘添加。KVM安装KVM 是基于CPU 辅助的全虚拟化方案，它需要CPU虚拟化特性的支持numactl –hardware检查是否支持KVM 
要支持 KVM， Intel CPU 的 vmx 或者 AMD CPU 的 svm 扩展必须生效a:  
grep ‘(vmx|svm)‘ /proc/cpuinfovmx是in]]></description><category></category></item><item><title><![CDATA[cos签名-xml接口-算法实现]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/70880443</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/70880443</guid><author>hellocooper</author><pubDate>Thu, 27 Apr 2017 22:21:57 +0800</pubDate><description><![CDATA[COS签名
腾讯云cos xml接口签名文档
https://qcloud.com/document/product/436/7778


Auth.h



    /// @brief 返回cos_xml接口的签名
    ///        腾讯云签名文档：https://qcloud.com/document/product/436/7778
    /// @pa]]></description><category></category></item><item><title><![CDATA[/bin和/sbin]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/54655865</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/54655865</guid><author>hellocooper</author><pubDate>Sat, 21 Jan 2017 23:49:54 +0800</pubDate><description><![CDATA[/bin,/sbin,/usr/sbin,/usr/bin 目录 
     这些目录都是存放命令的，首先区别下/sbin和/bin：从命令功能来看，/sbin 下的命令属于基本的系统命令，如shutdown，reboot，用于启动系统，修复系统，/bin下存放一些普通的基本命令，如ls,chmod等，这些命令在Linux系统里的配置文件脚本里经常用到。从用户权限的角度看，/sbin目录下的命令通常]]></description><category></category></item><item><title><![CDATA[systemd - CentOS 7进程守护&监控]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/53771125</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/53771125</guid><author>hellocooper</author><pubDate>Sat, 21 Jan 2017 23:46:24 +0800</pubDate><description><![CDATA[需求：运行环境为CentOS 7系统，我们开发了一个程序，需要在开机时启动它，当程序进程crash之后，守护进程立即拉起进程。解决方案：使用CentOS 7中的init进程systemdsystemd简介Linux Init & CentOS systemdLinux一直以来采用init进程。例如下面的命令用来启动服务： 
$ sudo /etc/init.d/apache2 start  
或者\]]></description><category></category></item><item><title><![CDATA[确保read和write数据完整]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/53207242</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/53207242</guid><author>hellocooper</author><pubDate>Thu, 17 Nov 2016 21:25:17 +0800</pubDate><description><![CDATA[write函数write函数定义如下：#include <unistd>
ssize_t write(int filedes, void *buf, size_t nbytes);
// 返回：若成功则返回写入的字节数，若出错则返回-1
// filedes：文件描述符
// buf:待写入数据缓存区
// nbytes:要写入的字节数同样，为了保证写入数据的完整性，在《UNIX网络编程 卷1》中，]]></description><category></category></item><item><title><![CDATA[linux send和recv函数详解]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/53207131</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/53207131</guid><author>hellocooper</author><pubDate>Thu, 17 Nov 2016 21:14:26 +0800</pubDate><description><![CDATA[#include <sys/socket.h>ssize_t recv(int sockfd, void *buff, size_t nbytes, int flags);
ssize_t send(int sockfd, const void *buff, size_t nbytes, int flags);recv 和send的前3个参数等同于read和write。flags参数值为0或：]]></description><category></category></item><item><title><![CDATA[vim配置]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/50915366</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/50915366</guid><author>hellocooper</author><pubDate>Thu, 17 Mar 2016 17:11:40 +0800</pubDate><description><![CDATA[经常重装服务器系统，mark一下。 
[moon@earth alien]$ vim ~/.vimrcset nu
syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set cindent]]></description><category></category></item><item><title><![CDATA[linux常用命令－find和grep区别及使用方法]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/50914529</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/50914529</guid><author>hellocooper</author><pubDate>Thu, 17 Mar 2016 16:46:06 +0800</pubDate><description><![CDATA[find和grep区别

find用法详解

grep用法详解]]></description><category></category></item><item><title><![CDATA[轻松学习RSA加密算法原理]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/50847972</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/50847972</guid><author>hellocooper</author><pubDate>Thu, 10 Mar 2016 16:46:05 +0800</pubDate><description><![CDATA[http://blog.youkuaiyun.com/q376420785/article/details/8557266

http://www.ruanyifeng.com/blog/2013/07/rsa_algorithm_part_two.html







以前也接触过RSA加密算法，感觉这个东西太神秘了，是数学家的事，和我无关。但是，看了很多关于RSA加密算法原理的资料之]]></description><category></category></item><item><title><![CDATA[sk_buff]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/50542473</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/50542473</guid><author>hellocooper</author><pubDate>Tue, 19 Jan 2016 14:48:34 +0800</pubDate><description><![CDATA[All network-related queues and buffers in the kernel use a common data structure, struct sk_buff.This is a large struct containing all the control information required for the packet (datagram, cell, w]]></description><category></category></item><item><title><![CDATA[leetcode 233 Number of Digit One]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/49280747</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/49280747</guid><author>hellocooper</author><pubDate>Tue, 20 Oct 2015 18:13:04 +0800</pubDate><description><![CDATA[问题：从1到n的整数中1出现的次数Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example: 
Given n = 13, 
Return 6, because digit 1 occurred in]]></description><category></category></item><item><title><![CDATA[KMP算法－字符串匹配]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/49279439</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/49279439</guid><author>hellocooper</author><pubDate>Tue, 20 Oct 2015 16:50:36 +0800</pubDate><description><![CDATA[先看看普通字符串匹配BF算法。BF算法BF算法是普通的模式匹配算法，BF算法的思想就是将目标串S的第一个字符与模式串P的第一个字符进行匹配，若相等，则继续比较S的第二个字符和P的第二个字符；若不相等，则比较S的第二个字符和P的第一个字符，依次比较下去，直到得出最后的匹配结果。代码实现：int BFMatch(string s,string p){
    int i,j;
    for(i=0;i]]></description><category></category></item><item><title><![CDATA[背包问题]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/49206185</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/49206185</guid><author>hellocooper</author><pubDate>Sat, 17 Oct 2015 18:50:52 +0800</pubDate><description><![CDATA[背包问题：
已知有n种物品，一个可容纳M重量的背包，物品i（1<=i<=n）的重量wiw_i，对应的价值为pip_i。怎样的装包，才能使包中物品的总价值最大？
已知条件：n，M，（p1p_1,p2p_2,…,pnp_n），（w1w_1,w2w_2,…,wnw_n）。
背包问题分为2种：如果物品可以拆分，就是普通背包问题。如果每个物品不能拆分，就是01背包问题。普通背包问题－贪心算法由于普通背包问题，]]></description><category></category></item><item><title><![CDATA[catalan数]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/49176859</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/49176859</guid><author>hellocooper</author><pubDate>Fri, 16 Oct 2015 11:48:16 +0800</pubDate><description><![CDATA[算法课最后一节讲到了卡特兰数，总结和学到了很多以前不知道的东西。卡特兰数的递推公式是F(n)=∑(k=1…n){F(k-1)*F(n-k)}=∑(k=0…n-1){F(k)*F(n-k-1)} 
一般性公式为F(n)=C(2n,n)/(n+1)可以描述的问题有 
1、n个元素的二叉查找树有多少种。 
2、n*n棋盘从左下角走到右上角而不穿过主对角线的走法。 
3、2n个人排队买票问题，票价50，n个]]></description><category></category></item><item><title><![CDATA[组合问题：全组合和C(n,m)]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/48814345</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/48814345</guid><author>hellocooper</author><pubDate>Tue, 29 Sep 2015 23:35:50 +0800</pubDate><description><![CDATA[问题： 
1.数组a[1~n]，生成数组中所有元素的组合。 
2.生成C(n,m)组合问题一：全组合思想: 数组长度为4，用4位2进制：0000～1111，二进制位为1表示选取该位元素，0表示不选。 
代码：//nums数组长度为n，mask为n位二进制掩码，二进制位为0，则选取该对应元素
vector<int> getCombByMask(vector<int> nums,int mask,int]]></description><category></category></item><item><title><![CDATA[全排列问题：序号与排列转换]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/48809261</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/48809261</guid><author>hellocooper</author><pubDate>Tue, 29 Sep 2015 17:35:54 +0800</pubDate><description><![CDATA[问题：全排列按字典序排序，每个排列都对应有一个序号。1.根据序号求排列；2.根据排列求序号。思想：n的阶乘的进制思想，从前往后一次是n!, (n-1)!, …, 2!, 1!。代码：1.根据排列求序号//一个排列在字典序全排列中的序号，输入：一个排列，输出：排列的序号
int perm2num(vector<int> p){
    int n=p.size();
    int num=0;]]></description><category></category></item><item><title><![CDATA[全排列生成算法]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/48809171</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/48809171</guid><author>hellocooper</author><pubDate>Tue, 29 Sep 2015 17:28:49 +0800</pubDate><description><![CDATA[问题：生成1～n的全排列（生成一个数组中所有元素的全排列）。方法一：字典序方法思想：依据字典序顺序，由前一个排列，生成后一个排列。 
代码：//字典序方法：输入前一个排列，输出后一个排列
vector<int> &nextPermutation(vector<int> &p){
    unsigned long left,right;    left=right=p.size()-1;
    w]]></description><category></category></item><item><title><![CDATA[网易163邮箱配置－iOS、OS X邮箱客户端]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/48751413</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/48751413</guid><author>hellocooper</author><pubDate>Sat, 26 Sep 2015 14:24:40 +0800</pubDate><description><![CDATA[最近处于找工作阶段，收邮件比较头疼，我用了foxmail邮箱和163邮箱，想用一个客户端收邮件。我个人常用foxmail，但是像应聘360和网易等还是用163的邮箱比较好。本人是轻度强迫症患者：想让自己的MacBook Pro和iPhone 6s的邮件客户端能同时连接上foxmail和163，这样收发邮件就很方便。不想用网易的邮箱大师客户端，还有一个原因是邮箱大师没有mac版。连接foxmail比较]]></description><category></category></item><item><title><![CDATA[leetcode 3	Longest Substring Without Repeating Characters]]></title><link>https://blog.youkuaiyun.com/hellocooper/article/details/48658415</link><guid>https://blog.youkuaiyun.com/hellocooper/article/details/48658415</guid><author>hellocooper</author><pubDate>Tue, 22 Sep 2015 19:08:43 +0800</pubDate><description><![CDATA[Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3. For “]]></description><category></category></item></channel></rss>