摘要: 一、首先检查服务器提供商的安全组协议 二、打开防火墙对应的端口 systemctl start firewalld systemctl status firewalld firewall-cmd --zone=public --add-port=3306/tcp --permanent//开启330 阅读全文
posted @ 2020-11-06 23:27 herrhu 阅读(554) 评论(0) 推荐(0)
摘要: 用数据模拟单链表与双链表 单链表 题目: #include <iostream> using namespace std; const int N = 100010; // head 表示头结点的下标 // e[i] 表示节点i的值 // ne[i] 表示节点i的next指针是多少 // idx 存 阅读全文
posted @ 2020-11-04 20:07 herrhu 阅读(140) 评论(0) 推荐(0)
摘要: 一、在项目中三峡shift打开搜索,搜索spring.factories 找到位于spring-boot-autoconfigure下的spring.factories 二、Ctrl+F搜索redis相关自动配置 三、分析Redis自动配置类 四、分析RedisProperties文件 五、通过以上 阅读全文
posted @ 2020-11-04 15:32 herrhu 阅读(505) 评论(0) 推荐(0)
摘要: 主要利用Trie树的特点存储字符串集合 题目 图解: 题解: #include<iostream> using namespace std; const int N = 100010; int s[N][26], cnt[N], idx; char str[N]; void insert(char 阅读全文
posted @ 2020-11-04 12:04 herrhu 阅读(128) 评论(0) 推荐(0)
摘要: 一、修改服务器提供商的安全组规则,开放6379端口(我是腾讯云) 二、修改服务器的防火墙规则,开放6379端口(CentOS7) 命令如下: systemctl start firewalld systemctl status firewalld firewall-cmd --zone=public 阅读全文
posted @ 2020-11-03 21:18 herrhu 阅读(503) 评论(2) 推荐(0)
摘要: 前缀和 前缀和本身是一种思想,用来解决一个确定区间的和的问题,如[l,r]; 它能将本身o[n]复杂度的情况变成o[1],基本公式如下 //一维前缀和 s[n] = a[1] + a[2] + a[3] + a[4] + ... + a[n] a[l] + a[l + 1] + ... + a[r] 阅读全文
posted @ 2020-11-01 18:28 herrhu 阅读(108) 评论(0) 推荐(0)
摘要: 一、新建一个SpringBoot项目,在最开始的启动类进行源码分析 二、开始源码分析 点击该类的注解,如下图 得到了更多的注解,继续点击 看到了导入一个选择器,进入这个选择器 在选择器中找到了如下方法 该方法利用SpringFactoriesLoader.loadFactoryNames此静态方法获 阅读全文
posted @ 2020-10-24 19:30 herrhu 阅读(168) 评论(0) 推荐(0)
摘要: 1 在redis的解压目录下执行make命令 make 2 报如下图错误 3 原因gcc版本问题 安装6版本的redis,gcc版本一定要5.3以上,centos6.6默认安装4.4.7;centos7.5.1804默认安装4.8.5,这里要升级gcc了。 4 使用scl解决,命令如下 [root@ 阅读全文
posted @ 2020-10-20 20:22 herrhu 阅读(259) 评论(0) 推荐(0)