Detailed explanation of intermediary model
1. Introduction
In real life, there are often complex interaction relationships between many objects. This interaction relationship is often a "mesh structure", which requires each object to know the object it needs to interact with. For example, everyone must remember the phone numbers of all his or her friends; Moreover, if someone ...
Posted by ambivalent on Mon, 17 Jan 2022 03:10:46 +0100
Interpreter mode of design mode
summary
As shown in the figure above, a software is designed for addition and subtraction calculation. Our first idea is to use tool classes to provide corresponding addition and subtraction tools and methods.
//Used to add two integers
public static int add(int a,int b){
return a + b;
}
//Used to add two integers
public static int add ...
Posted by d~l on Mon, 17 Jan 2022 00:12:03 +0100
Design basis of mobile application -- implementation of point menu list
Implementation of three-point menu list in the experiment of fundamentals of mobile application design
Experiment Name:
Implementation of point menu list
Tools, software and environment used:
JDK1.8,Android Studio
1, Purpose of the experiment:
Further understand the use of various Android controls, deepen the use of control propert ...
Posted by bobob on Sun, 16 Jan 2022 22:11:58 +0100
Hongmeng open source third-party component - particle crushing effect component Azexplosion_ohos
Foreword
Azexplosion, a particle crushing effect component based on Android platform( https://github.com/Xieyupeng520/AZExplosion ), the functional migration and reconstruction of Hongmeng are realized. The code has been open source to( https://gitee.com/isrc_ohos/azexplosion_ohos ), welcome all developers to download and use and put forward v ...
Posted by pennythetuff on Sun, 16 Jan 2022 20:53:49 +0100
Explore the prototype pattern of java design pattern
1. Analyze the disadvantages of traditional methods
Let's first look at the problem of cloned sheep: Now there is a sheep tom, whose name is tom, age is 1, and color is white. Please write a program to create 10 sheep with exactly the same attributes as tom sheep.
Using traditional methods: 1. Create entity class
package com.xzz;
public ...
Posted by Sinister747 on Sun, 16 Jan 2022 15:21:46 +0100
Explore the singleton design pattern of java design pattern
Singleton design pattern
Introduction to single example design mode The so-called class singleton design pattern is to take certain methods to ensure that there can only be one object instance for a class in the whole software system, and the class only provides a method to obtain its object instance (static method).
For example, Hibernat ...
Posted by jcd on Sun, 16 Jan 2022 09:49:25 +0100
META tags for common SEO optimization
Before right meta The understanding of the label is only
<meta charset="UTF-8">
And mobile end palatability
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
form
The meta tag has two attributes: http equiv attribute and name attribute
1. name att ...
Posted by groovything on Sun, 16 Jan 2022 03:26:03 +0100
Design pattern - strategy pattern
Prepare the duck project, and the specific requirements are as follows:
There are all kinds of ducks (such as wild duck, Peking duck, water duck, etc. ducks have all kinds of behaviors, such as barking, flying, etc.) Display duck information
1. Analysis and code implementation of traditional solutions to duck problems
Traditional desi ...
Posted by mynameisbob on Sat, 15 Jan 2022 11:43:51 +0100
Detailed explanation of memo mode
1. Introduction
Everyone makes mistakes and hopes to have a "regret medicine" to make up for their mistakes and start over, but the reality is cruel. In computer applications, customers also often make mistakes. Can we provide them with "regret medicine"? Of course, it is possible and necessary. This function is realized by ...
Posted by shakuni on Sat, 15 Jan 2022 08:23:47 +0100
Self study Hongmeng application development (23) - store a small amount of data locally
The lightweight preference database in Hongmeng system is mainly used to save some common configurations of applications. The data is stored in local files and loaded in memory, so the access speed is faster and more efficient.
Let's look at the demo video of this article first:
Preference
The first is to realize the basic function.
pu ...
Posted by raahool_16 on Sat, 15 Jan 2022 07:57:54 +0100