自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 kong在DB-less模式下如何修改timeout配置

kong在DB-less模式下如何修改timeout配置kong在DB-less模式下如何修改timeout配置通过kong.yml配置通过admin api方式修改kong在DB-less模式下如何修改timeout配置遇到问题:部分耗时接口会返回504[error] 69#0: *77462 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.

2021-01-15 15:55:19 898

原创 jedis实现redis事务方法exec返回空数组

正题:先说我发现的问题:当一个事务的执行被打断,jedis的exec()为什么没有返回null,返回的是一个empty list?原生redis 命令测试。最近我在使用redis的事务,也就是watch(),multi(),exec()。redis官方文档中说明了,如果watch(key1),并且在提交事务的时候,key1发生了改变,那么该事务中的所有,注意是所有命令都不会执行,并且exe...

2019-07-15 20:12:13 2096 1

原创 64. Minimum Path Sum

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at an...

2019-04-26 08:51:41 171

原创 62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to reach the bot...

2019-04-26 08:50:58 196

原创 338. Counting Bits

338. Counting BitsGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.Example...

2019-04-15 18:49:22 112

原创 读《java8 in action》

14年java8发布,至今已经5年了,实际上很多软件企业都没有转到java8,比如苏宁,至今还停留在java7。我公司虽然已经升级到了java8,但是实际开发中,各个同事用到java8的新功能少之又少,lambda是用的最多的,stream用的很少。ps:当然java8在很多地方都有改进。虽然之前已经在用这些新特性了,但最近才通过《java8 in action》这本书系统性了解新特性的,这里大...

2019-04-06 09:56:26 400

原创 vim/vi常用操作

复制一行:yy复制后粘贴一行:p撤销:u选中:v选中后复制: y

2019-03-28 11:46:20 203

原创 linux常用操作

修改权限,这个777意思就是可读可写可执行,chmod 777 查看环境变量,export解压缩zip,unzip 解压缩zip到指定文件夹 unzip -d 删除文件夹

2019-03-28 11:45:33 179

原创 http简单理解

简述:以下内容忽略非常多细节,仅个人抽象理解,请理性阅读。https是一种安全的协议。怎么才算安全?通信内容加密确认通信双方的身份原理介绍:​ https采用对称加密来加密通信的内容,比如密钥A,通信双方都持有A就能用来加密解密。​ 提出问题:密钥A如何传输?​ 密钥肯定不能明文传输,这里就要用到RSA非对称加密。RSA有一对钥匙,一个是私钥,一个是公钥,私钥自己保密,公钥是可...

2019-03-28 11:44:56 366

原创 rabbitmq基础

前言:之前一直没有系统学习一下rabbitmq,只Google突击学习一下就上手,最近在看《rabbitmq in action》,记一下理解后的要点。常用脚本命令:前台启动:rabbitmq-server以后台守护进程启动:rabbitmq-server -detached启动后查看状态:rabbitmqctl status停止节点:rabbitmqctl stop ,包括rabb...

2019-03-28 11:44:02 156

原创 git常用操作

git add //将要提交的文件的信息添加到索引库中,通俗点讲,就是暂存区git commit -m //将索引库钟的内容提交到本地仓库git push orgin master //将本地仓库中的改动提交到远程目录...

2019-03-28 11:43:12 134

原创 docker常用命令

docker常用命令:查看容器状态,docker stats 进入容器,docker exec -it 从容器中copy文件:docker ps :

2019-03-28 11:41:56 128

原创 94. Binary Tree Inorder Traversal

94. Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes’ values.Example:Input: [1,null,2,3] 1 \ 2 / 3Output: [1,3,2]Follow up: Recursi...

2019-03-26 15:03:27 122

原创 spring-integration优化MQTT(32202)异常

**前情:**公司的一个产品涉及到硬件交互,选用了mqtt协议,于是乎经过一番技术选型。我用emq做mqtt broker,又撸了一个mqtt消息处理服务(A)。这个A服务用了spring-integration,spring框架集成spring-integration自然是so easy。又花了点时间用策略设计模式写好了A服务的业务框架,接下来就是堆业务逻辑了。**问题:**自己做压力测试的...

2019-03-22 11:54:35 8116 9

原创 104. Maximum Depth of Binary Tree

104. Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note: ...

2019-03-19 18:18:18 121

原创 226. Invert Binary Tree

226. Invert Binary TreeInvert a binary tree.Example:Input: 4 / \ 2 7 / \ / \1 3 6 9Output: 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspi...

2019-03-19 18:17:28 125

原创 617. Merge Two Binary Trees

Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.You need to merge them into a new binary tree....

2019-03-19 18:16:25 123

原创 771. Jewels and Stones

771. Jewels and StonesYou’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to k...

2019-03-19 11:57:01 118

原创 283.Move Zeroes

283.Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.Example:Input: [0,1,0,3,12]Output: [1,3,12,0,0]...

2019-03-19 11:56:19 112

原创 169. Majority Element

169. Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the...

2019-03-19 11:55:27 122

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除