Zuoshen algorithm learning diary
According to a certain value, the unidirectional linked list can be divided into small on the left, equal in the middle and large on the right
[title]
Given the head node of a one-way linked list, the value type of the node is integer, and then given an integer pivot Realize a function to adjust the linked list. The left part o ...
Posted by pulsedriver on Thu, 28 Nov 2019 08:52:15 -0800
Summary of small pits encountered by the spring cloud gateway interceptor
Many friends may encounter the following problems when using spring cloud gateway
How to read Post request body in spring cloudgateway
private BodyInserter getBodyInserter(ServerWebExchange exchange) {
ServerRequest serverRequest = new DefaultServerRequest(exchange);
Mono<String> modifiedBody = serverRequest.bodyToMono ...
Posted by Scorptique on Thu, 28 Nov 2019 06:25:34 -0800
JavaScript implementation back to top effect
Copy Taobao back to top effect
Requirement: when the scroll bar reaches a certain position, the sidebar is fixed at a certain position, and then when it slides down to a certain position, the back to top button will be displayed. After clicking the button, the page will slide to the top dynamically, from fast to slow.
Train of thought:
1. js co ...
Posted by rowanparker on Tue, 26 Nov 2019 12:59:23 -0800
java algorithm binary tree
1. Find the maximum or minimum depth of binary tree
public int maxDepth(Tree root){
if(root == null)
return 0;
return 1 + Math.max(maxDepth(root.left), maxDepth(root.right));
}
public int minDepth(Tree root){
if(root == null)
return 0;
return 1 + Math.min(max ...
Posted by Kairu on Tue, 26 Nov 2019 10:30:35 -0800
c + + high precision multiplication (large number multiplication)
High precision multiplication
High precision multiplication refers to the multiplication of large integers that cannot be represented by ordinary data types (such as longint).
step
High precision multiplication mainly includes the following requirements and processes
1. In order to obtain the value of each bit of the input n ...
Posted by JamieinNH on Tue, 26 Nov 2019 06:59:10 -0800
J.U.C Parsing and Interpretation 1 (Implementation of Lock)
Preface
To save you time, let me briefly introduce this article.This article is divided into three main parts: the implementation of Lock, the origin of AQS (through evolution), the use and principle analysis of three major JUC tool classes.
Lock implementation: Briefly introduce the implementation of classic Lock under ReentrantLock and Reent ...
Posted by Inkybro on Mon, 25 Nov 2019 17:57:18 -0800
nginx shared memory mechanism explained in detail
Shared memory for nginx is one of the main reasons it can achieve high performance, mainly for file caching.This article first explains how shared memory is used, then how nginx manages shared memory.
1. Use examples
nginx declares that the instructions for shared memory are:
proxy_cache_path /Users/Mike/nginx-cache levels=1:2 keys_zone=one:10m ...
Posted by yaron on Mon, 25 Nov 2019 15:54:04 -0800
[Flutter] form submission
Make progress every day.
When you are free recently, learn about Flutter, occasionally record the learning content and problems.
Here is a simple form validation.
import 'package:flutter/material.dart';
class FormRoute extends StatefulWidget {
final String _title;
FormRoute(this._title);
@override
State<Statefu ...
Posted by malcolmboston on Mon, 25 Nov 2019 06:59:08 -0800
Thinking about GC mechanism caused by BUG in a JDK thread pool
Problem description
A few days ago, I was helping my colleagues to troubleshoot the occasional thread pool errors on the production line
The logic is simple, and the thread pool performs an asynchronous task with results. However, there have been occasional errors recently:
java.util.concurrent.RejectedExecutionException: Task java.util.concurr ...
Posted by shreej21 on Mon, 25 Nov 2019 01:10:44 -0800
Spring boot application in-depth learning
This section mainly introduces the in-depth learning of spring boot application class related source code.
It mainly includes:
Spring boot application custom boot configuration
Spring boot application life cycle, as well as customized configuration in various stages of the life cycle.
This section uses springboot 2.1.10.release. The correspon ...
Posted by mapexdrum on Sun, 24 Nov 2019 21:07:19 -0800