Redis based distributed lock implementation

From 1, Distributed lock overview In the multithreaded environment, in order to ensure that a code block can only be accessed by one thread at a time, we can generally use the synchronized syntax and ReetrantLock in Java to ensure that this is actually the way of local locking. But now companies are a ...

Posted by hillbilly928 on Fri, 19 Jun 2020 00:04:48 -0700

An article gives you a thorough understanding of the implementation of HashMap without worrying about being bullied.

Article catalog HashMap preface What is a red black tree Discoloration rotate Sinistral Dextral brief introduction Basic elements of HashMap Node Construction method HashMap() HashMap(int initialCapacity) HashMap(Map<? extends K, ? extends V> m) Add method put Get method get Expand resize ...

Posted by NoorAdiga on Thu, 18 Jun 2020 23:25:45 -0700

Python sorting algorithm

Python sorting algorithm All the following sorting methods will use the swap function to exchange the positions in the two lists. The code is as follows: def swap(lyst,i,j): temp = lyst[i] lyst[i]=lyst[j] lyst[j]=temp 1. Select Sorting: Principle (integer list sorting from small to larg ...

Posted by efegue on Thu, 18 Jun 2020 22:36:23 -0700

Python code to realize airplane battle

Article catalog Classic aircraft battle 1, Game settings 2, Our plane 3, Enemy aircraft 4, To fire a bullet 5, Issue supply package 6, Main module Classic aircraft battle The source code and material materials (pictures and audio) can be downloaded from the following github: Source code of ai ...

Posted by scottb1 on Thu, 18 Jun 2020 21:57:55 -0700

Java array sorting I [cloud map smart link]

Array concept: Array is a container with fixed data length to ensure the consistency of data types of multiple data. To declare an array is to draw a series of continuous spaces in the memory space Array name represents the first address of continuous space All elements of the array can be accessed successively through the first address   1, Th ...

Posted by heals1ic on Thu, 18 Jun 2020 03:16:17 -0700

[deep learning practical notes] yoloV3 multi object tracking pytorch implementation

Deep learning target tracking 1. Essence: get characteristic map, output classification and location by convolution neural network. 2. Classification of target tracking: ① Single class multitarget tracking: MTCNN, Retinaface ② Multi class and multi-target tracking: RCNN, spp net, fast RCNN / fast ...

Posted by scampbell on Thu, 18 Jun 2020 00:43:32 -0700

day03 switch & loop statement

1. switch statement 1.1 branch statement switch statement format switch (expression){ case 1: Statement body 1; break; case 2: Statement body 2; break; ... default: Statement body n+1; break; } Execution process: First calculate the value of the expression Secondly, compare wit ...

Posted by gobbly2100 on Wed, 17 Jun 2020 23:56:25 -0700

Finish MySQL (all) 2 in half a day

Finish MySQL in half a day (all) Finish MySQL (all) 1 in half a day The blogger uses MySQL version 8.0, and the storage engine is InnoDB. We don't explain InnoDB in detail here. If necessary, we recommend you to know This article Blog (or Baidu) https://www.jianshu.com/p/519fd7747137 3A. Add, delete, ...

Posted by pella.d on Wed, 17 Jun 2020 23:46:05 -0700

day8-python tuples, dictionaries, collections.

Article Directory Tuples, Dictionaries and Collections 1. Tuples 1. What is a tuple 1) Empty tuples: () 2) Tuples of a single element: (element) 3) Tuples of multiple elements: 2. Get the elements in the tuple 1) List of ways to get elements tuple support 2) Other ways (the same applies to lists) ...

Posted by suresh_m76 on Wed, 17 Jun 2020 09:25:45 -0700

Python notes 1 - numpy section

Start to sort out the important modules of python and the parts that you often forget. First, let's study and sort out numpy. First of all, numpy (Numerical Python) is a very important library of python. It is also a program library that I often use in my study and work process. It is mainly used for ar ...

Posted by mccormr7 on Tue, 16 Jun 2020 20:30:40 -0700