GoLang's slice bottom layer and expansion rules
GoLang's slice bottom layer and expansion rules
1. Structure
In the first part, where are the elements stored? In the second part, how many elements are stored and how many elements can be stored
2. Variable declaration int type slice
For example, declare an [] int, and the variable ints is composed of three parts on the right. The el ...
Added by ChrisDarl on Sat, 05 Mar 2022 14:07:33 +0200
Examples of thread safety problems and solutions (ReentrantLock)
1. Preface
This article is a follow-up to the previous article. The case is the same case. It is very simple. It is the case of taking the order number when going to teacher Tian for dinner. Without too much introduction, you can also see the detailed introduction of the previous article, as follows:1.1 synchronized solves thread safety pr ...
Added by pixeltrace on Sat, 05 Mar 2022 13:59:13 +0200
Java code automatic plug-in of syntax tree
Code piling is a common means of testing and locating problems. We can print or collect the data we need by inserting the corresponding code ("pile") at the corresponding position of the code.
Automatic pile insertion is to automatically insert one or more lines of code we need at a specific position of the code. Usually, we will ins ...
Added by WhiteShade6 on Sat, 05 Mar 2022 13:57:53 +0200
SpringBoot integrates JWT to realize login verification
1 Definition
The full name of JWT is JSON Web Token, which is the most popular cross domain authentication solution at present. JWT is an open standard based on JSON, which is designed to transfer declarations between network application environments.
This information can be verified and trusted because it is digitally signed. JWT can sign wi ...
Added by SnakeFox on Sat, 05 Mar 2022 13:56:47 +0200
Wechat applet
Before, the data set of small projects was still being collected and produced, which was a little troublesome. Finally, we prepared to make a small toy (in the form of small program). However, it is a little complicated to use the ready-made small program template, and many grammars are different from those used in web page development. Therefo ...
Added by XiaoRulez on Sat, 05 Mar 2022 13:54:02 +0200
PyTorch: data loading, mathematical principles, cat fish classification
1. Data loading
PyTorch has developed standard conventions for interacting with data, so it can process data consistently, regardless of image, text or audio. The two main conventions for interacting with data are dataset and data loader. Dataset is a Python class that enables us to obtain the data provided to neural networks. The data load ...
Added by johlwiler on Sat, 05 Mar 2022 13:52:56 +0200
Roll it up and take you to write a distributed RPC framework that middle and senior programmers will know
I summary
What is RPC?
Remote service callOfficial: the idea of requesting services from remote computer programs through the network without understanding the underlying network technologyA little more popular: without knowing the details of the call, the client calls an object that exists on the remote computer, just like calling an objec ...
Added by Skipjackrick on Sat, 05 Mar 2022 13:47:51 +0200
Microservice automation. 05 Use of idea plug-in
Docker is used in combination with Idea plug-in
1, Install docker plug-in
1. New idea project
2. Check whether there is a Docker in the plug-in
3. In docker The port number is indicated in the service file
modify
Docker
Service file
,
Comment out
"ExecStart"
This line and add the following information
ExecStart=/usr/bin ...
Added by metroblossom on Sat, 05 Mar 2022 13:31:06 +0200
General module design of exporting csv/json/list/datatable to excel
In the scenario of exporting excel, I usually export a List directly into a sheet, using npoi Mapper library is very convenient. Recently, I often need to convert the jsonarray returned by the interface into an excel table. For example, the columns obtained from elasticsearch or clickhouse are not fixed. For example, the clickhouse changes acco ...
Added by Theramore on Sat, 05 Mar 2022 13:03:22 +0200
OpenVINO application case: deploy YOLO model to edge computing camera
1, Implementation path
Deploy the YOLO model to the edge computing camera through OpenVINO. Its implementation path is: training (YOLO) - > transformation (OpenVINO) - > deployment and operation (OpenNCC).
2, Specific steps
1. Training YOLO model
1.1 installation environment dependency
For installation details, see https://github.co ...
Added by msimonds on Sat, 05 Mar 2022 12:50:11 +0200