java design pattern_ Decorator mode
1 Overview
The purpose of decorator mode is to enhance the performance of classes.
Inheritance can also enhance the functionality of classes.
2 examples (easy to observe and understand the decoration mode)
The Writer class is a class that writes files. It has three subclasses: TxtWriter, MP3Writer and AVIWriter
The standard for writing fil ...
Added by siric on Sat, 05 Mar 2022 01:16:39 +0200
Interviewer must ask series: handwritten publish subscribe mode and observer mode
catalogue
preface
1. Publish subscribe mode
definition
Handwritten publish subscribe mode
2. Observer mode
definition
Handwriting observer mode
3. The fundamental difference between the two
preface
Publish subscriber mode and observer mode are two design modes. They are the same in essence, but there are also differences. There are ...
Added by martins on Sat, 05 Mar 2022 01:13:24 +0200
Database - Troubleshooting of installation and deployment of InfluxDB [operation and maintenance understands this article is enough!]
1 - learning objectives
What do you do? What are the advantages? For which scenarios?What are the cluster schemes?Compared with other similar databases, what are the advantages and disadvantages?Detailed explanation of configuration file, how to optimize performance?Basic operation, data backup and recoveryQA summary
2 - what do you do? What ...
Added by spxdcz on Sat, 05 Mar 2022 01:06:07 +0200
Sets and strings
Sets and strings
aggregate
1. Recognition set
'''
A collection is a container type data type. Take {} as the flag of the container. Multiple data in it are separated by commas: {data 1, data 2, data 3,...}
Variable (support addition, deletion and modification); Unordered (subscript operation is not supported)
Requirements for elements: 1 ...
Added by olko on Sat, 05 Mar 2022 00:59:17 +0200
Real topic of the 11th Java group B Blue Bridge Cup
Write in front
Time flies, time flies, in a trance, the start of the Blue Bridge Cup is close at hand.. Why is it so official... Cough, the game will start tomorrow. As the saying goes, whet your gun when you are ready, you will be unhappy! Adhering to the excellent expertise of the Chinese nation, I came to brush the real problem of last year ...
Added by kingman65 on Sat, 05 Mar 2022 00:55:05 +0200
CSS learning notes
1, CSS introduction
css introduction method
Introduction method:1. Embedded2. Outreach3. InlineWriting position:Write css in the style tag of headImporting css file with link tag in headcss is written in the style attribute of the tagScope of action:Current pageMultiple pagesCurrent labelUsage scenario:Small caseIn the projectUse with js
...
Added by maxic0 on Sat, 05 Mar 2022 00:54:46 +0200
[summary of front-end knowledge points] WebAPI BOM & localStorage
Five objects of BOM
Window object: current browser window
1 . window object characteristics
Window is the top-level object in JavaScript. All global functions and global objects are the methods of window objects
For example, document, alert(), setInterval(), setTimeout(), and so on The member of the window object (attribute + method), whi ...
Added by maverickminds on Sat, 05 Mar 2022 00:44:49 +0200
Chapter V list
1, First acquaintance list
1. Understanding of lists
A variable can store an element, while a list is a "big container", which can store n more elements. The program can easily operate these data as a whole. A list is equivalent to an array in other languages, and a list is equivalent to a schoolbag containing many "books" ...
Added by nthomp on Sat, 05 Mar 2022 00:24:30 +0200
Unified exception handling, assertion and enumeration combined use cases
In the process of software development, it is inevitable to deal with all kinds of exceptions. For myself, at least more than half of the time is dealing with all kinds of exceptions, so there will be a lot of try {...} in the code catch {...} finally {...} Code blocks not only have a large number of redundant code, but also affect the readabi ...
Added by Ammar on Sat, 05 Mar 2022 00:21:16 +0200
[design mode youth version] create | singleton mode
Example creation mode (single type)
Hungry Han style
Hungry Chinese singleton has created a static object for the system to use at the same time of class creation, which will not be changed in the future. Therefore, it is thread safe and can be directly used for multithreading without problems.
The feature of this pattern is that once th ...
Added by jahwobbler on Sat, 05 Mar 2022 00:18:50 +0200