1, What is Seletor?
The literal meaning of selector is not easy to understand. Seletor is a listener that can listen to events in the Channel. Channels can be registered in the seletor. When these registered channels have events, the seletor's select method will return these events to the thread for processing.
2, The difference bet ...
1, lateinit delay initialization keyword
Many syntax features in Kotlin, such as variable immutability, variable non nullability, and so on, are designed to ensure program safety as much as possible. For example, there are many global variable instances in your class. In order to ensure that they can meet Kotlin's null pointer check sta ...
What is object-oriented?
Process oriented
The process oriented method of solving problems is to follow the steps we have analyzed, step by step, follow the principle of top-down and gradual refinement, and focus on the process and steps of solving problems.
object-oriented
Java Language is an object-oriented programming language, and obj ...
Posted by the_ut_tick on Sat, 30 Jul 2022 22:17:10 +0300
Question introduction
In the program engineering training course, a problem occurred:
Mobile phone screenshot nucleic acid detection report, using OpenCV software to automatically identify whether the time for nucleic acid detection is within 72 hours.
I. Preparations
Software needed to accomplish this task:
- Python3.x
- OpenCV-Py ...
Posted by fitzromeo on Sat, 02 Jul 2022 22:04:45 +0300
Write, append, read and copy operations of golang files
There is an OpenFile function under the os package of the Go language. Its prototype is as follows:
func OpenFile(name string, flag int, perm FileMode) (file *File, err error)
Where name is the file name of the file. If you are not running under the current path, you need to add the spe ...
Posted by teddmcload on Thu, 30 Jun 2022 16:56:27 +0300
I. core principle flow chart
II. The client monitors the server
2.1 implement udp listening
The constructor of PushReceiver will trigger the initialization of listener
public PushReceiver(HostReactor hostReactor) {
try {
this.hostReactor = hostReactor;
this.udpSocket = new DatagramSocket();
thi ...
Posted by spitfire_esquive on Thu, 30 Jun 2022 16:41:17 +0300
copy constructor
We often use a variable to initialize a variable of the same type, so there should be similar operations for custom types, so how to use an existing object to create another same object when creating an object?
Constructor: There is only a single parameter, which is a reference to an object of this class type (usually cons ...
Posted by mad81 on Wed, 25 May 2022 10:40:27 +0300
Introduction: common string codes include LATIN1, UTF-8, UTF-16 and GB18030. They have their own characteristics, and the conversion between them is complex. This article will introduce the skills to improve the performance of Java string encoding and decoding.
Author Wen Shaojin (high speed railway)
Source: Alibaba developer official account
...
Posted by phil88 on Tue, 24 May 2022 14:50:50 +0300
preface Benefits of generics Wildcards in generics
Commonly used T, E, K, V,? ? Unbounded wildcards Upper bound wildcard <? extends E> Wildcard lower bound? super E> ? Difference between and T Class < T > and "class <? > difference Summary
preface
Java generics is a new feature introduced in JDK 5. Ge ...
Posted by jb60606 on Mon, 23 May 2022 23:59:38 +0300
This learning content comes from station b: dark horse programmer
Note: I was speechless and failed to punch in. Normally, this should be the fourth day. After listening to the object-oriented part, I didn't understand it. I listened to it again. Now I feel a little on the road, but I know it's only the simplest, and there's more difficult to ...
Posted by AlanG on Mon, 23 May 2022 21:53:09 +0300