[design mode] detailed single example mode
What is singleton mode
This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is created. This class provides a way to access its unique object, which can be accessed directly without instantiating the object of this class.
matters needing attention
Singleton mode can on ...
Posted by dspeer on Wed, 23 Feb 2022 10:37:50 +0100
Plist in Linux -- a two-way linked list with descending priority
plist
https://elixir.bootlin.com/linux/v4.9.59/source/include/linux/plist.h#L212
*Descending priority sorted double linked list
plist is a list of nodes sorted by priority; The priority of each node is from INT_MIN to INT_MAX (minimum).
The time complexity of inserting is O(k), the time complexity of deleting is O(1), and the time complexit ...
Posted by Daggeth on Wed, 23 Feb 2022 10:21:51 +0100
Day 5 of Leetcode algorithm Introduction (double pointer)
876. Intermediate node of linked list
Title Description
Given a non empty single linked list with head node, return the intermediate node of the linked list.
If there are two intermediate nodes, the second intermediate node is returned.
Sample
Input:[1,2,3,4,5]
Output:[3,4,5]
Explanation: the returned node value is 3 (The serializatio ...
Posted by eazyefolife on Wed, 23 Feb 2022 09:54:43 +0100
Analysis: what "algorithms" are used in the "sorting" function of java
I mean, Ho saidWhen sorting data a few days agoSlide your hand into the arrays The source code of sort () methodIn line with the mentality of "if you come, you will be at ease"Just watch it, buddyI didn't expect to have a new harvestoriginalArrays. The sort () method will use different "sorting algorithms" according to diff ...
Posted by ScotDiddle on Wed, 23 Feb 2022 09:40:28 +0100
[SystemVerilog basics] Interface Quick Start Guide
1, interface introduction
1.1 background of interface generation
Traditional Verilog connects Testbench and DUT: name mapping and location mapping.
SystemVerilog improves and supplements the connection mode of Verilog and introduces the interface.
1.2 use mode of interface
The connection can be realized directly through the instant ...
Posted by php new bie on Wed, 23 Feb 2022 09:26:48 +0100
PDF is generated at the front end to impress the back end
PDF introduction
The full name of PDF is Portable Document Format (PDF). The display of this format has nothing to do with the operating system, resolution, device and other factors. PDF format is common in Windows, Unix and Apple's Mac OS operating system. Adobe created this file format for document transmission in 1993. This format uses Post ...
Posted by XtacY on Wed, 23 Feb 2022 08:53:46 +0100
python system learning dictionary and collection
Dictionaries
d = {key1 : value1, key2 : value2, key3 : value3 } Keys must be unique, but values do not. The value can take any data type, but the key must be immutable, such as string and number.
Modify dictionary
The way to add new content to the dictionary is to add new key / value pairs
tinydict = {'Name': 'Runoob', 'Age': 7, 'Class': ' ...
Posted by SpinCode on Wed, 23 Feb 2022 08:49:43 +0100
Making greedy snake
Imitation of Russian design to make greedy snake
Basic design ideas Draw a grid, make a map, Four buttons to control the direction, up, down, left and right, A snake is composed of a snake body and a snake head - all of which are squares of the same size Box attribute - x-y color - can be added when drawing The change in the movement xy of th ...
Posted by dacio on Wed, 23 Feb 2022 08:35:08 +0100
Detailed explanation of Mybatis SQL mapping file
Before that, we learned the global configuration file of mybatis. Now we begin to learn the mapping file of mybatis. In the mapping file, you can write the following top-level element labels:
cache – Cache configuration for this namespace.
cache-ref – Cache configuration that references other namespaces.
resultMap – Describing how to load obje ...
Posted by Buddski on Wed, 23 Feb 2022 08:01:31 +0100
Implementation principle analysis of [Android] plug-in framework Virtual APK
1 . preface
Virtual APK is an excellent plug-in framework developed by didi travel. Its main developer is teacher Ren Yugang
Speaking of Mr. Ren Yugang, he can be said to be the first teacher of my Android FrameWork layer. When I first came into contact with Android, after dragging the controls for several years and writing some CURD operati ...
Posted by bombas79 on Wed, 23 Feb 2022 07:56:53 +0100