09 2020 档案

docker备忘录
摘要:docker 安装redis pull image create redis.conf and data folder # Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程 #deamonize no # 你可以绑定单一接口,如果没有绑定,所有接口都会监听到来的连 阅读全文

posted @ 2020-09-30 14:18 mindSucker 阅读(125) 评论(0) 推荐(0) 编辑

GUAVA-RateLimit
摘要:RateLimit目前这个工具类还在@Bate阶段,在官方wiki文档中,还找不到; 1.当我们使用rateLimiter,我们能够实现什么? RateLimiter rl = RateLimiter.create(double permitsPerSecod); 通过如上的方法我们可以知道,Rat 阅读全文

posted @ 2020-09-28 11:55 mindSucker 阅读(179) 评论(0) 推荐(0) 编辑

JDK各版本发展史
摘要:JDK1.0 1.1 1996年Java有了第一个正式版本的运行环境。代表技术包括:Java虚拟机,Applet,AWT;1997年,Jar格式,JDBC,JavaBeans,RMI诞生; JDK1.2 1998年,SUN将Java技术体系拆分成三个方向,桌面引用开发J2SE,企业级开发J2EE,手 阅读全文

posted @ 2020-09-08 20:15 mindSucker 阅读(803) 评论(0) 推荐(0) 编辑

C++ 基础备忘录
摘要://1. char 转 int char a = '3'; int intA = a - '0'; //2.string 转 int int num = atoi(input.data()); //3.num 转 string string resultString = to_string(num) 阅读全文

posted @ 2020-09-06 17:00 mindSucker 阅读(82) 评论(0) 推荐(0) 编辑

PAT 1004 Counting Leaves
摘要:A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp 阅读全文

posted @ 2020-09-06 11:15 mindSucker 阅读(90) 评论(0) 推荐(0) 编辑

PAT 1003 Emergency
摘要:原题目: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by so 阅读全文

posted @ 2020-09-04 16:40 mindSucker 阅读(105) 评论(0) 推荐(0) 编辑

DFS 深度优先搜索
摘要:#include "DFS.h" #include <list> #include <stack> using namespace std; DFS::DFS(int vertexCount) { this->v = vertexCount; this->adj = new list<int>[v] 阅读全文

posted @ 2020-09-03 19:25 mindSucker 阅读(163) 评论(0) 推荐(0) 编辑

BFS 广度优先搜索
摘要:#include <queue> #include <list> #include "BFS.h" using namespace std; BFS::BFS(int vertexCount){ this->v = vertexCount; this->adj = new list<int>[v]; 阅读全文

posted @ 2020-09-03 19:24 mindSucker 阅读(122) 评论(0) 推荐(0) 编辑

Shell Sort 希尔排序
摘要:class ShellSort { public: void sort(int * arr, int size); }; #include "ShellSort.h" #include <iostream> void ShellSort::sort(int *arr, int size) { int 阅读全文

posted @ 2020-09-03 19:22 mindSucker 阅读(162) 评论(0) 推荐(0) 编辑

Quick Sort 快速排序
摘要:class QuickSort { public: void sort(int * arr, int size); private: int partition(int * arr, int start, int end); void quickSort(int *arr, int start, i 阅读全文

posted @ 2020-09-03 19:20 mindSucker 阅读(153) 评论(0) 推荐(0) 编辑

Merge Sort 归并排序
摘要:class MergeSort { public: void sort(int * arr, int size); private: void arrCopy(int *sourceArr, int *targetArr, int size); void divideSort(int *arr, i 阅读全文

posted @ 2020-09-03 19:18 mindSucker 阅读(82) 评论(0) 推荐(0) 编辑

Insertion Sort
摘要:class InsertionSort { public: void sort(int * arr, int size); }; #include "InsertionSort.h" /** * 本质上是遍历每个元素,和数组前部的有序部分进行一一比较,找到合适的位置,进行插入 * 所以这里有两部分逻 阅读全文

posted @ 2020-09-03 19:17 mindSucker 阅读(110) 评论(0) 推荐(0) 编辑

Bubble Sort
摘要:class BubbleSort { public: void sort(int * arr, int size); }; #include "BubbleSort.h" /** * 冒泡排序,意思是从头开始,拿 j 和 j+1 元素 进行比较,如果前面的元素大于后面的元素,那么就进行交换,就像冒泡 阅读全文

posted @ 2020-09-03 19:15 mindSucker 阅读(153) 评论(0) 推荐(0) 编辑