Tag:Pattern

  • Analysis of history mode in HTML5

    Time:2019-12-9

    Recently, I saw the implementation of the HTML5 history mode routing of Vue router, and then I studied the HTML5 history by the way. Here are my own understandings. By the way, I wrote a router similar to the HTML5 history mode router in Vue router with jQuery to achieve the purpose of hands-on training […]

  • MySQL time type and mode

    Time:2019-12-7

    When I was inMySQLAn error is reported when trying to insert a data with a time stamp in the database: mysql> insert into alarm_service values (6, ‘1970-01-01 08:00:00’); ERROR 1292 (22007): Incorrect datetime value: ‘1970-01-01 08:00:00’ for column ‘time’ at row 1 #View table structure mysql> show create table alarm_service; +—————+————————————————————————————————————————————————————————————————————————————–+ | Table | Create […]

  • Consul cluster server mode

    Time:2019-12-4

    Consul cluster server mode Architecture diagram There are two operation modes of consul in production environment: server mode and client mode (DEV mode belongs to development mode, which is not discussed here). First, we use server mode to build a consul cluster, as shown in the figure below: Consul server a, B and C are […]

  • Consul cluster server + client mode

    Time:2019-12-3

    Consul cluster server + client mode Architecture diagram There are two problems with using only consul’s server mode: Pressure bearing (scalability) is a problem because the number of consul servers is under control. Server rarely causes many microservices to be registered under a server. When the server hangs up, the microservices registered under this server […]

  • Before ole can be called, the current thread must be set to single thread unit (STA) mode

    Time:2019-12-1

    Today, after setting the relevant properties of combox’s fuzzy query function in WinForm, this.comboBoxPM.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.comboBoxPM.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; At runtime, the following error was reported By looking for relevant information, we learned about sta cell mode and COM objects. In general, many controls in WinForm are COM objects, which can only be called by […]

  • Vuex source code analysis (2) details of state and strict attributes

    Time:2019-11-16

    State is the value in vuex, that is, the state of the whole vuex. Strict is related to the setting of state. If strict is set to true, the value in state cannot be modified directly, but can only be set through mutation Example 1: Document count:{{count}} <span style=”background-color: #f5f5f5; color: #000000;”> const store </span><span […]

  • 06. Object advanced – object creation mode

    Time:2019-11-15

    01. Object constructor mode Method 1: object constructor mode*Routine: create an empty object object first, and then add properties / methods dynamically*Applicable scenario: uncertain internal data of objects at the beginning*Problem: too many statements //A person: Name: “Tom”, age: 12 var p = new Object() p = {} p.name = ‘Tom’ p.age = 12 p.setName […]

  • RDS architecture on cloud

    Time:2019-11-9

    Summary More and more enterprises choose to go to the cloud. The most basic cloud service is IAAs (infrastructure as a service), which is a virtual host. Users do not need to build their own computer rooms and purchase their own servers. Instead, they directly purchase ECS (Elastic Compute service) from cloud manufacturers and pay […]

  • Database foundation of SQL learning notes (1)

    Time:2019-11-6

    Database foundation Composition of database system: it consists of database, database management software, DBA, hardware and software supporting database system. Database administrator is a professional administrator who plans, designs, maintains and monitors database, and plays a very important role in database system   The three-level mode deconstruction of database system is divided into: Internal mode […]

  • Activity of four Android components

    Time:2019-11-2

    Preface Hi, Hello, everyone. We met again. In the last issue, we talked about how to install as. Are there any partners who can’t wait to create their own projects and start to try them? So in this issue, we mainly introduce activities. As one of the four components of Android, activity plays a very […]

  • 6. Multithreaded singleton mode

    Time:2019-10-31

          The original singleton mode is no longer applicable in multithreaded environment, so what should I do? Answer: (1) single instance mode of thread safety with double locking     (2) static initialization singleton mode     Direct instantiationSingletonObject inGetInstanceMethod_Instanceobject   We know that static members are initialized only once, that is to […]

  • Data storage and access: SharedPreferences

    Time:2019-10-30

    UseSharedPreferences(save user preference parameters) save data. When our application wants to save some user preference parameters, such as whether to log in automatically, remember the account password, and whether to log inWifiUnder the ability of networking and other related information, if you use the database, it seems a little overqualified! We call the above configuration […]