react learning - State Hook
1, State Hook
1,useState
State Hook is a function used in function components (useState), which is used to use state in function components
useState
The function has a parameter whose value represents the default value of the stateThe return value of the function is an array, which must contain two items
Item 1: value of current stat ...
Posted by hairyjim on Thu, 10 Feb 2022 13:41:47 +0100
Service startup process -- Based on Android 11
Service startup process -- Based on Android 11
Recently, when reviewing the relevant knowledge points of Android system, we all know that Android has four components: Activity, Service, Broadcast Receive and Content Provider. Compared with other knowledge points, the best way to review the four components is to follow the source code again. Wh ...
Posted by dionsweet on Thu, 10 Feb 2022 13:32:37 +0100
setContentView, a familiar and unfamiliar setContentView system
Why is setContentView familiar? Because this method is a method we have been in contact with since we started Android development. It is found in every Activity we have written. But why is setContentView strange? Because we only know how to use it in our daily development, and we don't deeply analyze how this method turns the layout resource id ...
Posted by sharapov on Thu, 10 Feb 2022 13:28:24 +0100
Linux driven development_ Detailed explanation of dev, devfs, sysfs, udev, proc device file system and introduction of kobject structure
catalogue
What is a device manager?
The function of dev under Linux
Devfs
sysfs
kobject
udev
proc
What is a device manager?
The device manager is responsible for managing the peripherals on this computer. When we insert a keyboard and mouse through the USB port provided by the computer, the device manager will communicate with it t ...
Posted by Dennis1986 on Thu, 10 Feb 2022 13:27:18 +0100
What if the List set is unsafe under the condition of multithreading concurrency? The new colleague was directly confused by me
preface
Some time ago, a new employee came to the company. He said that the new employee had been outsourcing code for one and a half years before he came to our company. Once I chatted with him about List. I casually asked him how to solve the unsafe multi-threaded concurrency of List collection when outsourcing. Unexpectedly, he looked at me ...
Posted by gdboling on Thu, 10 Feb 2022 13:19:36 +0100
C + + learning notes (11): common containers in STL
This blog post is a note taken when learning the C + + video of dark horse programmer. It is only convenient to review the old and know the new. It is not used for other purposes.
1, string container
1.1 basic concept of string
1. Essence: String is a C + + style string, and string is essentially a class
2. The difference between string ...
Posted by Anarchatos on Thu, 10 Feb 2022 13:17:35 +0100
[Linux] software package management super detailed notes
Introduction to software package management
Software package classification
Source package The source package needs to be compiled into binary package before installation, so the installation is slow. There is also a special package called script installation package in the source package. This package does not need to be installed manua ...
Posted by direwolf on Thu, 10 Feb 2022 13:04:36 +0100
JWT security issues
JWT overview
Json Web Token (JWT) is a JSON based open standard implemented to transfer declarations between network application environments. The declaration of JWT is generally used to transfer the authenticated user identity information between identity providers and service providers, so as to obtain resources from the resource serv ...
Posted by jestaji on Thu, 10 Feb 2022 12:58:59 +0100
Nginx virtual directory alias and root directory
Nginx sets the virtual directory through alias. In the configuration of nginx, the alias directory is different from the root directory:
1) The directory specified by alias is accurate, that is, the files in the path directory accessed by location matching are directly found in the alias directory; 2) The directory specified by root is the ...
Posted by todd2006 on Thu, 10 Feb 2022 12:48:40 +0100
Explore polymorphism in C + +
Concept of polymorphism 1
Generally speaking, it is a variety of forms. Specifically, it is to complete a certain behavior. When different objects complete it, they will produce different states.
2 Definition and implementation of polymorphism
2.1 composition conditions of polymorphism
Polymorphic conditions are introduced with the help ...
Posted by hadingrh on Thu, 10 Feb 2022 12:37:05 +0100