<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title>Saber 的博客</title>
  <id>http://pipe.b3log.org/blogs/Saber</id>
  <updated></updated>
  <subtitle>记录精彩的程序人生</subtitle>
  <link href="http://pipe.b3log.org/blogs/Saber"></link>
  <entry>
    <title>Word导出工具类</title>
    <updated>2018-03-05T17:07:20+08:00</updated>
    <id>tag:pipe.b3log.org,2018-03-05:/blogs/Saber/articles/2018/03/05/1520240839520</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/03/05/1520240839520" rel="alternate"></link>
    <summary type="html">importfreemarker.cache.URLTemplateLoader;importfreemarker.template.Configuration;importfreemarker.template.Template;importjavax.servlet.ServletOutputStream;importjavax.servlet.http.HttpServletResponse;</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>实现主线程与子线程交替执行</title>
    <updated>2018-01-29T17:15:00+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-29:/blogs/Saber/articles/2018/01/29/1517217299707</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/29/1517217299707" rel="alternate"></link>
    <summary type="html">原题子线程循环 10 次，接着主线程循环 100，接着又回到子线程循环 10 次，接着再回到主线程又循环 100，如此循环 50 次，请写出程序实现其实创建子线程本来只需要在 Main 函数内 newThread 即可，但为了遵循阿里巴巴的编码规约，尝试使用了线程池来创建子线程。实现线程工厂 importjava.util.ArrayList;importjava.util.Date;importjava.util.List</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>寻找数组中第k小（大）的元素</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721971</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721971" rel="alternate"></link>
    <summary type="html">寻找数组中第 k 小（大）的元素#include&#34;iostream&#34;#defineNUM100usingnamespacestd;inta[13]={1,4,5,6,3,16,8,9,11,13,26,15,36,};intselect(intleft,intright,intk){if(left&amp;gt;=right)returna[left];intp=a[left];inti=left;intj=righ</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>配置Nginx逆向代理开启SSL</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722223</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722223" rel="alternate"></link>
    <summary type="html">配置 Nginx 逆向代理开启 SSL 这年头，https 已经是标配了博客自然也不例外，前几天的时候因为一些问题将服务器回滚了，发现 Nginx 的配置并没被快照备份，只好重新配置了一番，虽然很简单，但是为了以后的方便，记录一下。启动 Tale 确定可以访问：http://服务器 IP：9000 准备好 crt 证书及 key 我用的是腾讯云的免费 SSL 服务，证书管理中下载 SSL 证书，提取 Nginx 文件夹中的两个文件，即 1_x</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>装载问题</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722199</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722199" rel="alternate"></link>
    <summary type="html">装载问题集装箱装载问题要求在不超过轮船载重量的前提下，将尽可能多的集装箱装上船；样例：输入：8041872536 输出：79 分析：本题可采用 FIFO 队列式分支限界算法，将解空间树的所有节点按照广度搜索的顺序排列成一个先进先出的队列，并用-1 作为每一层的分割符。C++ 实现：#include&#34;iostream&#34;#include&#34;queue&#34;#defineNUM100usingnamespacestd;in</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>背包问题-贪心算法-物品可分割</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722174</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722174" rel="alternate"></link>
    <summary type="html">背包问题-贪心算法-物品可分割#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#include&amp;lt;algorithm&amp;gt;#defineNUM100usingnamespacestd;structbag{intw;//重量 intv;//价值 doublec;//谓之，性价比 intid;//物品编号 intx;//装入部分}b[NUM];structbag2{intw;intv;doub</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>老鼠跑的快</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722151</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722151" rel="alternate"></link>
    <summary type="html">老鼠跑的快#include&#34;stdafx.h&#34;#include&#34;iostream&#34;usingnamespacestd;intcount[1001]={0};intpath[1001]={0};structmouse{intweight,speed,id;}mice[1001];intcmp(constvoid*a,constvoid*b){mouse*ta=(mouse*)a;mouse*tb=(m</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>统一异常处理</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722132</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722132" rel="alternate"></link>
    <summary type="html">统一异常处理统一返回数据的格式创建一个 Result 类，用来作为返回值的类型 code 错误编码 msg 错误信息 data 返回数据，返回错误的话为 nullpublicclassResult&amp;lt;T&amp;gt;{//错误码 privateIntegercode;//提示信息 privateStringmsg;//数据 privateTdata;publicIntegergetCode(){returncode;}publicRes</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>碉堡放置-图的搜索</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722116</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722116" rel="alternate"></link>
    <summary type="html">碉堡放置-图的搜索//Fire.cpp:定义控制台应用程序的入口点。//#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#defineNUM100usingnamespacestd;charcMap[NUM][NUM];intiBest;intn;boolCanPut(intx,inty){inti;for(i=x-1;i&amp;gt;=0;i--){if(cMap[i][y]==&#39;o&#39;</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>活动安排问题-贪心算法</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722096</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722096" rel="alternate"></link>
    <summary type="html">活动安排问题-贪心算法#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#include&amp;lt;algorithm&amp;gt;#defineNUM100usingnamespacestd;structaction{intstart;intend;intid;}a[1000];intcmp(constaction&amp;a,constaction&amp;b){if(a.end&amp;gt;b.end)returnfal</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>最长字段和-动态规划</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722068</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722068" rel="alternate"></link>
    <summary type="html">最长字段和-动态规划#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#definenum100usingnamespacestd;inta[num];intMaxSum(intn){intsum=0;intb=0;for(inti=1;i&amp;lt;=n;i++){if(b&amp;gt;0)b+=a[i];elseb=a[i];if(b&amp;gt;sum)sum=b;}returnsum;}intMaxSu</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>最长单调递增子序列</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722043</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722043" rel="alternate"></link>
    <summary type="html">最长单调递增子序列设 L={a1,a2,a3,...,an}是 n 个不同的实数组成的序列，L 的递增子序列是这样一个序列：L`={ak1,ak2,ak3,...,akm}其中，k1&amp;lt;k2&amp;lt;k3&amp;lt;...&amp;lt;km，且 ak1&amp;lt;=ak2&amp;lt;=ak3&amp;lt;=...&amp;lt;=akm 求：最大值 m 分析：设辅助数组 b，b[i]表示以 a[i]结尾的最长单调递增子序列的长度，则 m 的值为 max{b[i]}1&amp;lt;=i&amp;lt;=n;状态转移方程：b[1]</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>最大字段和-分治法</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722028</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722028" rel="alternate"></link>
    <summary type="html">最大字段和-分治法#include&#34;stdafx.h&#34;#include&#34;iostream&#34;usingnamespacestd;inta[1001];intb[8]={1,-3,7,8,-4,12,-10,6};intGetMax(inta,intb,intc){if(a&amp;gt;b)if(b&amp;gt;c)returna;elseif(a&amp;gt;c)returna;elsereturnc;elseif(b&amp;gt;c)return</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>数字的全排列</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131722009</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131722009" rel="alternate"></link>
    <summary type="html">数字的全排列#include&#34;stdafx.h&#34;#include&#34;iostream&#34;usingnamespacestd;voidPerm(intlist[],intk,intm){if(k==m){for(inti=0;i&amp;lt;=m;i++){cout&amp;lt;&amp;lt;list[i]&amp;lt;&amp;lt;&#34;&#34;;}cout&amp;lt;&amp;lt;endl;}else{for(intj=k;j&amp;lt;=m;j++){swap(list[k],list[j]);Pe</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>搭建Spring Initializr服务器</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721988</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721988" rel="alternate"></link>
    <summary type="html">搭建 SpringInitializr 服务器官方的 SpringInitializr 太慢了，决定在自己的 Centos 搭一个安装 SdkmanSDKMAN 软件开发工具管理包（SoftwareDevelopmentKitManager，简称 SDKMAN）用来管理多个版本的开发环境的工具。提供命令行来安装、切换、删除、列出候选版本。#curl-s&#34;https://get.sdkman.io&#34;|bash#sour</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>字符数组的所有子集</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721951</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721951" rel="alternate"></link>
    <summary type="html">字符数组的所有子集#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#include&amp;lt;cmath&amp;gt;usingnamespacestd;//输出子集 voidgetSubset(charlist[]){intlength=strlen(list);cout&amp;lt;&amp;lt;length;for(inti=0;i&amp;lt;=pow(2,length)-1;i++){for(intj=0;j&amp;lt;length;</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>基因序列</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721925</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721925" rel="alternate"></link>
    <summary type="html">基因序列#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#include&#34;string&#34;#defineNUM100usingnamespacestd;intn=0;chars1[NUM];chars2[NUM];charmap[128];intscore[5][5]={{5,-1,-2,-1,-3},{-1,5,-3,-2,-4},{-2,-3,5,-2,-2},{-1,-2</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>单调递增序列最大长度</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721901</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721901" rel="alternate"></link>
    <summary type="html">单调递增序列最大长度#include&#34;stdafx.h&#34;#include&#34;iostream&#34;#definenum100usingnamespacestd;inta[num];//原始数据//intc[num][num];//最优解 intLIS(intn){intb[num]={0};//最大长度数组 inti,j;b[1]=1;intmax=0;for(i=2;i&amp;lt;=n;i++){intk=0;//暂</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>利用JPA实现数据库操作</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721883</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721883" rel="alternate"></link>
    <summary type="html">利用 JPA 实现数据库操作利用 jpa 操作数据库及其简单，只需要继承 JpaRepository 类，只需要在必要的时候进行扩展 importorg.springframework.data.jpa.repository.JpaRepository;importjava.util.List;publicinterfaceGirlRepositoryextendsJpaRepository&amp;lt;Girl,Integ</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
  <entry>
    <title>yml配置文件使用</title>
    <updated>2018-01-28T17:28:42+08:00</updated>
    <id>tag:pipe.b3log.org,2018-01-28:/blogs/Saber/articles/2018/01/28/1517131721864</id>
    <link href="http://pipe.b3log.org/blogs/Saber/articles/2018/01/28/1517131721864" rel="alternate"></link>
    <summary type="html">yml 配置文件使用推荐使用 yml 文件代替默认的 properties 作为原来配置文件@ConfigurationProperties(prefix=&#34;girl&#34;)用来注入配置文件中的值，prefix 为配置文件中一个属性集合的前缀例如：在 application.yml 中配置这样的属性 girl:age:18cupSize:C 然后创建对应的实体类，并添加注解@ConfigurationProperties(</summary>
    <author>
      <name>Saber</name>
    </author>
  </entry>
</feed>