自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 374. Guess Number Higher or Lower

this is a binary search problem.code show as below:public class Solution extends GuessGame { public int guessNumber(int n) { int left = 1, right = n; while (left < right) { ...

2019-07-11 10:58:24 121

原创 367. Valid Perfect Square

method1simple but not allow public boolean isPerfectSquare(int num) { int sqrt = (int) Math.sqrt(num); return sqrt * sqrt == num; }method2newto method public boolean isP...

2019-07-11 10:32:28 132

原创 redis cluster keyspace expired subscribe use spring boot redis data

redis cluster过期key订阅开启redis过期key订阅订阅redis过期key时间开启redis过期key订阅首先通过这篇文章了解下相关的配置和单机版的该如何使用,然后如果你配置redis集群时没有开启EKx,那么也可以通过redis-cli -c -p port CONFIG set notify-keyspace-events EKx的方式开启,需要每个节点都设置一下...

2019-06-13 15:07:53 596

原创 nginx正向代理https

nginx正向代理https需求当出现下述情形时,我们需要使用正向代理:我们的client不能直接访问到服务器,倒是其他的client可以访问,且我们的client到OtherClient的网络是通的。 如何搭建正向代理 使用nginx 使用squid 。。。其他的方式  注本人搭建的方式为nginx 使用nginx搭建正向...

2018-12-07 16:48:01 10940 5

原创 使用PowerMock冒烟创建新的对象

1.导入包&lt;!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-mockito --&gt;&lt;dependency&gt;    &lt;groupId&gt;org.powermock&lt;/groupId&gt;    &lt;artifactId&gt;powermock-api-mo...

2018-10-19 22:33:49 497

原创 PowerMock with Jacoco使用PreparedForTest坑

NO WAY TO USER!!!!! The simplest way to use JaCoCo it is — on-the-fly instrumentation with using JaCoCo Java Agent. In this case a class in modified when it is being loaded. You can just run you a...

2018-10-19 22:05:27 2599

原创 logback的简单使用

1. logback简介Logback is intended as a successor to the popular log4j project, picking up where log4j leaves off.Logback's architecture is sufficiently generic so as to apply under different circums...

2018-09-19 17:53:02 157

原创 mac idea 2018.2下载

下载地址:http://future.nos-eastchina1.126.net/idea201802---存储至网易对象存储。

2018-07-28 11:39:52 1020

原创 java jdk10下载

点击链接即可下载:http://future.nos-eastchina1.126.net/mac_jdk10.0.2-----使用网易对象存储。

2018-07-28 11:38:18 1530

原创 idea提示bug

properties in parent definition are prohibited 这个是新版的IDEA(2018.01)的bug,不用理会。使用mvn编译是完全不影响的

2018-07-27 15:26:20 2499

原创 spring boot jar启动

1. spring boot打成jar包在pom中加入下面的配置:&lt;plugin&gt;    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;    &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;    &lt;configuration...

2018-07-19 23:18:22 1183

原创 二叉树中和为某一值的路径

import java.util.ArrayList;import java.util.Stack;import java.util.Collections;/**public class TreeNode {    int val = 0;    TreeNode left = null;    TreeNode right = null;    public TreeNode(int val)...

2018-04-20 22:18:14 90

原创 树的最小的深度

链接:https://www.nowcoder.com/questionTerminal/e08819cfdeb34985a8de9c4e6562e724来源:牛客网Given a binary tree, find its minimum depth.The minimum depth is thenumber of nodes along the shortest path from the ...

2018-04-11 20:52:20 144

原创 ShardedJedis中使用byte[]的方式删除Key

由于ShardedJedis中没有提供通过byte[]直接删除Key的方式,只存在String的方式,所以如果想通过byte[]的方式删除,那么需要使用下面的代码:Jedis jedis = shardedJedis.getShard(key);if(jedis != null){ jedis.del(key);//如果删除成功,返回1,失败返回0}

2018-01-12 17:10:53 1232 4

空空如也

空空如也

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

TA关注的人

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