centos下openresty+lua入门实践
安装openresty 1、安装依赖开发库 yum install pcre-devel openssl-devel gcc curl postgresql-devel 2、下载 + 编译 + 安装 wget https://openresty.org/download/openresty-1.19.3.1.tar.gz 我刚开始先下载的1.19.3.1版本,但是在编译时增加nginx_upstream_check_module模块,一直报错,错误信息如下 ./configure: error: the ngx_http_upstream_check_m...
[docker-es]-None of the configured nodes are available
问题: springboot连接我用docker启动的es服务时报错,None of the configured nodes are available 解决方案: 1、先通过http://localhost:9200/查看参数cluster_name 和 springboot里配置的参数cluster_name是否一致,如果不一致,要修改成一致 2、如果通过修改cluster_name参数仍然无法解决,这时候就要看下Spring Data Elasticsearch 依赖 和 Elasticsearch的版本对应关系了 Spring Data ...
推荐几个不错的Mac版微信插件(查看撤回消息、多开)
1、微信 macOS 客户端增强 Tweak 动态库 2、微信简易版助手,各种花里胡哨的功能
[java]SpingBoot修改启动文字图标
1、进入 src/main/resources 目录下,新建banner.txt 文件 2、进入字母转字符串,字母转字符串 ,制作一个你想要的,然后复制到banner.txt文件中即可,再次启动就可以看到了
[java]SpringBoot启动失败(Reason: Failed to determine a suitable driver class)
原因:启动时不需要数据源加载,但加载了数据源,数据源获取失败,异常报错,启动失败。 在启动类的@SpringBootApplication加上以下代码 @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) public class SpringbootEsApplication { public static void main(String[] args) { SpringApplication.run(SpringbootEsApplicati...
docker安装es的中文分词器ik插件
两种安装方式 1、use elasticsearch-plugin to install docker exec -it elasticsearch /bin/sh cd bin/ elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.1.1/elasticsearch-analysis-ik-7.1.1.zip 执行完毕后 elasticsearch-plugin list #查看 elasticsear...
[php]PHP 两个有序数组合并成一个有序数组
<?php $a = [1,3,5,7,9,11]; $b = [2,4,6,8,10]; function test_sort($a,$b){ $c = []; $aCount = count($a); $bCount = count($b); $i = $j = 0; while($i < $aCount && $j < $bCount){ if($a[$i] > $b[$j]){ ...
正七迎鸡兔
正七迎鸡兔, 二八虎合猴, 三九蛇共猪, 四十龙合狗, 牛羊五十一, 鼠马六十二。
php下正则匹配大字符串失败问题
问题描述: 在使用php函数preg_match匹配大字符串的时候匹配失败,而删除一半数据,则匹配成功, 解决过程: 于是在匹配结束后,调用preg_last_error()函数,查看失败原因,返回的是6,6对应的错误原因是PREG_JIT_STACKLIMIT_ERROR,原来当字符串太大的时候,栈空间满了,直接就出错了,于是在匹配前加一下代码 ini_set('pcre.jit', 0); 解决查找的资料 1、深悉正则(pcre)最大回溯/递归限制(https://www.laruence.com/2010/06/08/1579.html)
Mac下使用clion调试redis源码
1、先从github上下载源码 1.1搜索https://github.com/search?q=redis+clion 1.2最好是选择别人配置好CMakeLists.txt的,不然自己配置也很麻烦 2、下载完成,开始配置 //选择一个想要调试的版本进行下载 wget https://github.com/htw0056/redis-3.0-annotated-cmake-in-clion/archive/master.zip //解压 unzip redis-3.0-annotated-cmake-in-clion-master.zip //重命名+...