The third comprehensive system practice
1, Installation of docker compose
Download docker composesudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
Apply executable permissions to binariessudo chmod +x /usr/local/bin/docker-compose
Create s ...
Posted on Fri, 08 May 2020 19:31:51 -0700 by v4g
1, Static member
1. If an object is only used once, is it necessary to create an object? Isn't it more convenient to treat a class as an object directly2. If multiple objects need to share some properties and methods, but they must be called by independent objects, and they can ...
Posted on Sat, 18 Jan 2020 20:21:28 -0800 by sprint10s
Singleton pattern (ensure that a class is instantiated only once and can be instantiated by itself)
Factory mode (replaces new operation)
Strategy pattern (use different methods to achieve the same goal)
Observer mode (when one object changes, other objects will trigger corresponding operations)
Adapter pattern (encapsulating different methods ...
Posted on Sat, 04 Jan 2020 02:18:18 -0800 by frog_
Characteristic: Three Private One Public: Private static variables (store instances), Private construction methods (prevent creating instances), Private cloning methods (prevent cloning objects), Public static methods (provide instances to the outside world)
Scenarios: In the application of programs, when database operations ...
Posted on Fri, 06 Dec 2019 03:50:08 -0800 by ycoleman
This database class mainly deals with creating database objects in the single instance mode. If there are two long time intervals to execute sql operations, the problem of connection failure will occur when processing again. A cache array is used to store pdo objects and time stamps, and the time between the two executions is compared. If the i ...
Posted on Fri, 15 Nov 2019 06:12:37 -0800 by insightstyle