<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[路漫漫其修远兮]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/sumword_</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; sumword_]]></copyright><item><title><![CDATA[【笔记】编写可读代码的艺术]]></title><link>https://blog.csdn.net/sumword_/article/details/89157925</link><guid>https://blog.csdn.net/sumword_/article/details/89157925</guid><author>sumword_</author><pubDate>Tue, 09 Apr 2019 18:43:06 +0800</pubDate><description><![CDATA[本文为阅读《编写可读代码的艺术》的笔记，阅读原书请移步我的资源下载区

如何给变量/函数命名？

1.选专业的词，如使用DownloadPage/FetchPage替换GetPage

2.避免tmp等泛泛的词

3.循环迭代器变量的命名 metrics[mi].user[uj].name[nk]

4.避免抽象的名称 ServerCanStart()换成CanListenOnPort()

5....]]></description><category></category></item><item><title><![CDATA[raft协议学习笔记]]></title><link>https://blog.csdn.net/sumword_/article/details/88687337</link><guid>https://blog.csdn.net/sumword_/article/details/88687337</guid><author>sumword_</author><pubDate>Wed, 20 Mar 2019 15:04:16 +0800</pubDate><description><![CDATA[此文为自己学习笔记，结构很凌乱。如果大家想学习具体的细节，可以到本文引用的网址下进行学习。

初学者可以先看一下这个博客，理解起来比较轻松。但是细节讲的不深刻。

然后能够翻墙，英语ok的话，强烈推荐Youtube的一个视频。

看完这个视频，可能还有一些疑问，在看一下一个很详细的学习笔记，这时候读起来应该轻松很多很多了。



正文是对YouTube视频的学习笔记





一、Leader ...]]></description><category></category></item><item><title><![CDATA[GO语言 const常量预定义 itoa的使用方法]]></title><link>https://blog.csdn.net/sumword_/article/details/88665159</link><guid>https://blog.csdn.net/sumword_/article/details/88665159</guid><author>sumword_</author><pubDate>Tue, 19 Mar 2019 16:17:30 +0800</pubDate><description><![CDATA[预定义常量

Go 语言预定义了这些常量：true、false 和 iota。
iota 比较特殊，可以被认为是一个可被编译器修改的常量，它默认开始值是0，每调用一次加1。遇到 const 关键字时被重置为 0。

示例:


const (       // iota被重设为0
    c0 = iota // c0 == 0
    c1 = iota // c1 == 1
    c2 =...]]></description><category></category></item><item><title><![CDATA[线程池介绍及工作原理]]></title><link>https://blog.csdn.net/sumword_/article/details/88562202</link><guid>https://blog.csdn.net/sumword_/article/details/88562202</guid><author>sumword_</author><pubDate>Thu, 14 Mar 2019 21:44:57 +0800</pubDate><description><![CDATA[连接池用于创建和管理数据库连接的缓冲池技术，缓冲池中的连接可以被任何需要他们的线程使用。当一个线程需要用JDBC对一个数据库操作时，将从池中请求一个连接。当这个连接使用完毕后，将返回到连接池中，等待为其他的线程服务。连接池的主要优点有以下三个方面。

第一、减少连接创建时间。连接池中的连接是已准备好的、可重复使用的，获取后可以直接访问数据库，因此减少了连接创建的次数和时间。

第二、简化的编程模...]]></description><category></category></item><item><title><![CDATA[负载均衡的形式  详解]]></title><link>https://blog.csdn.net/sumword_/article/details/88561422</link><guid>https://blog.csdn.net/sumword_/article/details/88561422</guid><author>sumword_</author><pubDate>Thu, 14 Mar 2019 21:08:24 +0800</pubDate><description><![CDATA[该文通篇复制，仅仅是怕该文章在知乎失效，故转载记录，仅供自己记录使用，文末有出处

什么是负载均衡？

负载均衡（Load Balance）是分布式系统架构设计中必须考虑的因素之一，负载均衡主要是实现对系统的高可用、网络压力的缓解、处理能力的伸缩。对于数据流量过大，往往单一设备是无法承担的，需要多台的设计进行分流。它通常是指，将请求/数据【均匀】分摊到多个操作单元上执行，负载均衡的关键在于【均匀】...]]></description><category></category></item><item><title><![CDATA[NSQ使用详解 （MAC端 + Linux端）]]></title><link>https://blog.csdn.net/sumword_/article/details/88531801</link><guid>https://blog.csdn.net/sumword_/article/details/88531801</guid><author>sumword_</author><pubDate>Wed, 13 Mar 2019 15:18:34 +0800</pubDate><description><![CDATA[关于nsq的功能和特性，本文中不再赘述。

对nsq完全没有了解的同学，可以读一下nsq官方文档，英文阅读能力有限的同学可以阅读翻译后的版本。但是翻译后的quick_start（快速开始）部分的代码有点问题。


 $ curl -d 'hello world 1' 'http://127.0.0.1:4151/put?topic=test'

应该改成


 $ curl -d 'hello w...]]></description><category></category></item><item><title><![CDATA[Go语言入门 小白 教程详解]]></title><link>https://blog.csdn.net/sumword_/article/details/87877420</link><guid>https://blog.csdn.net/sumword_/article/details/87877420</guid><author>sumword_</author><pubDate>Mon, 25 Feb 2019 10:35:27 +0800</pubDate><description><![CDATA[Go的变量与函数声明方式


//函数调用方法

a,b := swap(...)

//函数编写格式

func name(x, y string) (int, string){

  do something...

}

func name(x, y string) (c1 int, c2 string){

  return //此时return会返回 c1和c2

}

//变...]]></description><category></category></item><item><title><![CDATA[LeetCode_3 无重复字符的最长子串 longest-substring-without-repeating-characters]]></title><link>https://blog.csdn.net/sumword_/article/details/86773678</link><guid>https://blog.csdn.net/sumword_/article/details/86773678</guid><author>sumword_</author><pubDate>Thu, 07 Feb 2019 23:44:47 +0800</pubDate><description><![CDATA[滑动窗口，简单题



int lengthOfLongestSubstring(string s) {
    unordered_map&amp;lt;char, int&amp;gt; mymap;
    int pre = 0;
    int maxx = 0;
    for(int i = 0; i &amp;lt; s.size(); i++){
        if(mymap.find(s[i]) ...]]></description><category></category></item><item><title><![CDATA[LeetCode_2 add_two_numbers 两数之和]]></title><link>https://blog.csdn.net/sumword_/article/details/86773432</link><guid>https://blog.csdn.net/sumword_/article/details/86773432</guid><author>sumword_</author><pubDate>Thu, 07 Feb 2019 22:46:20 +0800</pubDate><description><![CDATA[简单题


ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {
    ListNode * l3, *head;
    head = new ListNode(-1);
    l3 = head;
    int flag=0;
    while(l1 || l2 || flag){
        int sum = 0;
    ...]]></description><category></category></item><item><title><![CDATA[leetcode_1 两数之和 Two Sum]]></title><link>https://blog.csdn.net/sumword_/article/details/86773258</link><guid>https://blog.csdn.net/sumword_/article/details/86773258</guid><author>sumword_</author><pubDate>Thu, 07 Feb 2019 22:12:16 +0800</pubDate><description><![CDATA[方法一：

将nums数组sort一下，然后使用遍历所有元素，二分查找target-nums[i]是否存在于数组中。

但是这个方法要考虑在对数组元素排序以后，保存该元素的原始位置，所以只能使用pair。相对比较麻烦。


bool cmp(pair&amp;lt;int,int&amp;gt; a, pair&amp;lt;int,int&amp;gt; b){
    return a.second &amp;lt; b.secon...]]></description><category></category></item><item><title><![CDATA[hadoop安装（1）jdk安装]]></title><link>https://blog.csdn.net/sumword_/article/details/85110864</link><guid>https://blog.csdn.net/sumword_/article/details/85110864</guid><author>sumword_</author><pubDate>Thu, 20 Dec 2018 00:52:00 +0800</pubDate><description><![CDATA[https://www.linuxidc.com/Linux/2016-09/135403.htm]]></description><category></category></item><item><title><![CDATA[OperatorCalc_Stack]]></title><link>https://blog.csdn.net/sumword_/article/details/69251233</link><guid>https://blog.csdn.net/sumword_/article/details/69251233</guid><author>sumword_</author><pubDate>Wed, 05 Apr 2017 14:29:13 +0800</pubDate><description><![CDATA[
#include&amp;lt;iostream&amp;gt;
#include&amp;lt;algorithm&amp;gt;
#include&amp;lt;cstdio&amp;gt;
#include&amp;lt;cstring&amp;gt;
#include&amp;lt;set&amp;gt;
#include&amp;lt;queue&amp;gt;
#include&amp;lt;map&amp;gt;
#include&amp;lt;math.h&amp;gt;
#include]]></description><category></category></item><item><title><![CDATA[反转问题POJ_3279]]></title><link>https://blog.csdn.net/sumword_/article/details/66619446</link><guid>https://blog.csdn.net/sumword_/article/details/66619446</guid><author>sumword_</author><pubDate>Mon, 27 Mar 2017 00:29:14 +0800</pubDate><description><![CDATA[Fliptile




Time Limit: 2000MS
 
Memory Limit: 65536K


Total Submissions: 9453
 
Accepted: 3532




Description

Farmer John knows that an intellectually satisfied cow is a happy ]]></description><category></category></item><item><title><![CDATA[反转问题POJ_3276]]></title><link>https://blog.csdn.net/sumword_/article/details/66478507</link><guid>https://blog.csdn.net/sumword_/article/details/66478507</guid><author>sumword_</author><pubDate>Sun, 26 Mar 2017 20:08:14 +0800</pubDate><description><![CDATA[Face The Right Way




Time Limit: 2000MS
 
Memory Limit: 65536K


Total Submissions: 4768
 
Accepted: 2214




Description

Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a]]></description><category></category></item><item><title><![CDATA[最大流流模板题hdu_1532]]></title><link>https://blog.csdn.net/sumword_/article/details/61918126</link><guid>https://blog.csdn.net/sumword_/article/details/61918126</guid><author>sumword_</author><pubDate>Mon, 13 Mar 2017 15:09:46 +0800</pubDate><description><![CDATA[模板如下，注意是先输入的边数，后输入的点数，勿错。
#include
#include
#include
#include
#include
#define MAXX 205
#define INF 0x3fffffff
using namespace std;
struct Node{
    int to;
    int cap;
    int rev;
};
bool used[MAX]]></description><category></category></item><item><title><![CDATA[DP Codeforces Round 401#div2 E.Hanoi Factory]]></title><link>https://blog.csdn.net/sumword_/article/details/57082993</link><guid>https://blog.csdn.net/sumword_/article/details/57082993</guid><author>sumword_</author><pubDate>Sat, 25 Feb 2017 15:46:30 +0800</pubDate><description><![CDATA[E. Hanoi Factory


time limit per test
1 second


memory limit per test
256 megabytes


input
standard input


output
standard output



Of course you have heard the famous task ab]]></description><category></category></item><item><title><![CDATA[C++ 优先队列的基本使用方法]]></title><link>https://blog.csdn.net/sumword_/article/details/54847254</link><guid>https://blog.csdn.net/sumword_/article/details/54847254</guid><author>sumword_</author><pubDate>Fri, 03 Feb 2017 15:35:27 +0800</pubDate><description><![CDATA[[cpp] view
 plain copy


 



#include  
#include  
using namespace std;  
  
priority_queueint> da;  //大根堆  
priority_queueint,vectorint>,greaterint> > xiao;  //小根堆，最后的两个“>”之间要有空格，vector]]></description><category></category></item><item><title><![CDATA[POJ2236并查集]]></title><link>https://blog.csdn.net/sumword_/article/details/54847020</link><guid>https://blog.csdn.net/sumword_/article/details/54847020</guid><author>sumword_</author><pubDate>Fri, 03 Feb 2017 15:31:19 +0800</pubDate><description><![CDATA[Wireless Network




Time Limit: 10000MS
 
Memory Limit: 65536K


Total Submissions: 25345
 
Accepted: 10533





Description

An earthquake takes place in Southeast Asia. The ACM ]]></description><category></category></item><item><title><![CDATA[poj2955（括号匹配问题）]]></title><link>https://blog.csdn.net/sumword_/article/details/53444450</link><guid>https://blog.csdn.net/sumword_/article/details/53444450</guid><author>sumword_</author><pubDate>Sat, 03 Dec 2016 14:45:04 +0800</pubDate><description><![CDATA[题意：给你一串()[]括号，要你求出这串括号的最大匹配个数，如'('与')'匹配，为2个，'['与']'匹配，为2个，其他不能匹配.......

思路：dp[i][j]代表从区间i到区间j所匹配的括号的最大个数，首先，假设不匹配，那么dp[i][j]=dp[i+1][j]；然后查找i+1~~j有木有与第i个括号匹配的

有的话，dp[i][j]=max(dp[i][j],dp[i+1][]]></description><category></category></item><item><title><![CDATA[区间DP_Halloween Costumes_light oj_1422]]></title><link>https://blog.csdn.net/sumword_/article/details/53440835</link><guid>https://blog.csdn.net/sumword_/article/details/53440835</guid><author>sumword_</author><pubDate>Sat, 03 Dec 2016 00:38:46 +0800</pubDate><description><![CDATA[Halloween Costumes





Time Limit: 2000MS
Memory Limit: 32768KB
64bit IO Format: %lld & %llu




Submit Status uDebug

Description

Gappu has a very busy weekend ahead of him. Becaus]]></description><category></category></item></channel></rss>