Source Interpretation of Golang's sync.Map Implementation Principle

brief introduction Gos built-in maps do not support concurrent write operations, because map write operations are not concurrently secure. When you try multiple Goroutine operations on the same map, an error occurs: fatal error: concurrent map writes. So sync.Map has been officially introduced to accommodate concurrent programming applications. ...

Posted by skeener on Sun, 22 Mar 2020 22:56:00 -0700

LeetCode 945. Make the array the only minimum increment

My LeetCode brush Title source [GitHub]: https://github.com/izhoujie/Algorithmcii LeetCode 945. Make the array the only minimum increment subject Given an array of integers A, any A[i] is selected and incremented by 1 for each move operation. Returns the minimum number of operations that make each value in A unique. Example 1: Input: [1,2,2] ...

Posted by tomato on Sun, 22 Mar 2020 10:52:55 -0700

Fuzzy/Multiline/Grouping/Sorting/Paging Queries for MySQL Database Tables and Explanation of the Word MySQL Data Type--Explanation 2

Foreword: Today I will tell you: MySQL database table fuzzy/multiline/grouping/sorting/paging query and MySQL data type explanation, of course, if you are interested in the basic operation of the database--database creation/table addition/deletion check, you can see my article-- Basic operations for MySQL database tables (add, delete, change ch ...

Posted by jabbaonthedais on Sat, 21 Mar 2020 23:19:49 -0700

Linux-Packaged Tutorial Club Series-shell

Preface Remember the fear of being dominated by bat.It's really hard to write bat scripts than shell scripts. Now that you understand these advanced languages, such as java js, it's easy to understand shell s.Learn simple grammar, look at scripts in familiar applications like tomcat and nacos, and learn other people's skills. It's about getting ...

Posted by mpower on Sat, 21 Mar 2020 22:14:33 -0700

Quick start to golang [8.2] - Secrets of automatic type inference

Preceding text Quick introduction to golang [1] - Introduction to go golang quick start [2.1]-go language development environment configuration windows golang quick start [2.2]-go language development environment configuration - macOS golang quick start [2.3]-go language development environment configuration linux Get started with golang [3]- ...

Posted by KILOGRAM on Sat, 21 Mar 2020 08:26:47 -0700

JS -- quick sorting and merging

Catalog Quick sorting and merging of JS sorting algorithm Quick sort Merge sort Quick sorting and merging of JS sorting algorithm Quick sort Principle: select a key (generally the first element) and divide the array into two regions. All the regions on the left are less than or equal to the key, ...

Posted by willcodeforfoo on Sat, 21 Mar 2020 07:05:21 -0700

Elastic search: simple addition, deletion, modification and search

Today, let's talk about the addition, deletion, modification and query of ES, which is helpful to understand the code of spring boot integration es next week. First of all, we create an index of EST first, and then if all the screenshots are taken, the reading fluency is too low, so we will use the shorthand form [request type URL] next. The f ...

Posted by escabiz on Sat, 21 Mar 2020 06:17:18 -0700

JS -- simple sorting of sorting algorithm

Catalog Simple sorting of JS sorting Bubble sort Direct insert sort Direct selection sorting Simple sorting of JS sorting Bubble sort Time complexity: O(n^2) Stable sorting algorithm Features: looking from the back to the front, all the numbers in the ordered area must be less than (or g ...

Posted by freedomclan on Fri, 20 Mar 2020 10:44:40 -0700

Design Mode - Creative Mode Details

In software engineering, Creative mode is a design mode that deals with object creation, trying to create objects in an appropriate way according to the actual situation.Basic object creation can lead to design problems or increase design complexity.Creative mode solves problems by controlling the creation of objects in some way. Common creati ...

Posted by harnacks on Thu, 19 Mar 2020 23:59:05 -0700

Create operator in RxJS

The creation operators in RxJs are the starting point of creating data flow. These operators can create a flow out of nothing or according to other data forms. The Observable constructor can directly create a data flow, such as: const $source=new Observable(observer=>{ observer.next(1); observer.next(2); observer.next(3); }) H ...

Posted by brij_theinvader on Thu, 19 Mar 2020 04:46:31 -0700