These 25 Vue tips you need to know

1. Limit prop to type list Using the {validator} option in the prop definition, you can limit prop to a specific set of values: export default { name: 'Image', props: { src: { type: String, }, style: { type: String, validator: s => ['square', 'rounded'].includes(s) } } }; Copy code The validator f ...

Posted by Domcsore on Thu, 06 Jan 2022 01:12:18 +0100

Interviewer: what design patterns does Spring use? Just say three

With regard to design patterns, if used properly, it will make our code more concise and extensible. This article mainly explains how to use policy pattern, factory method pattern and Builder pattern in Spring. 1. Strategy mode The usage of policy pattern is actually relatively simple in Spring. In essence, policy pattern is that there are mu ...

Posted by bucfan99 on Wed, 05 Jan 2022 16:17:49 +0100

Simple construction of ELK architecture

1, Configure node node 1. Change the names of several servers (easy to identify) Server 1: hostnamectl set hostname node1 Server 2: hostnamectl set hostname node2 Server 3: hostnamectl set hostname Apache After completion, refresh again to see if it is successful vim /etc/hosts #Enter the configuration file, add the host name and I ...

Posted by esas_nefret on Wed, 05 Jan 2022 12:52:01 +0100

It is said that 90% of people don't really understand Spring's dependency injection

preface Spring is certainly no stranger to everyone. It is a barrier that every java developer can't get around. Spring framework provides a complete set of solutions for Java based enterprise applications, which facilitates developers to quickly carry out business development on the basis of the framework. On the official website, we found t ...

Posted by seenu_vas80 on Wed, 05 Jan 2022 07:53:31 +0100

What are the conditions of index failure? When will the index expire? (comprehensive summary)

Although you have built an index on this column and the query criteria are also index columns, the final execution plan does not take its index. Here are some key points causing this problem. Column to column comparison In a table, two columns (ID and c_id) have separate indexes. The following query criteria will not go through the index ...

Posted by dizzy1 on Tue, 04 Jan 2022 22:50:07 +0100

Spark on yarn - spark submits tasks to yarn cluster for source code analysis

catalogue 1, Entry class - SparkSubmit 2, SparkApplication startup - JavaMainApplication, YarnClusterApplication 3, SparkContext initialization 4, YarnClientSchedulerBackend and YarnClusterSchedulerBackend initialization 5, ApplicationMaster startup 6, Spark on Yan task submission process summary 1, Entry class - SparkSubmit When sub ...

Posted by suepahfly on Tue, 04 Jan 2022 10:03:33 +0100

Go Web framework | Gin introduction, one-day tutorial

Gin framework   Basic installation 1. First, you need to install Go (version 1.10 + is required), and then you can use the following Go command to install Gin. go get -u github.com/gin-gonic/gin 2. Import it into your code: import "github.com/gin-gonic/gin" Usage example: package main import ( "net/http" "github.com/ ...

Posted by coditoergosum on Mon, 03 Jan 2022 16:21:49 +0100

binlog format of MySQL log → discussion on the default isolation level of MySQL

Background issues Before talking about binlog, let's review the default isolation level of mainstream relational databases. It's the default isolation level, not the isolation levels of transactions. Don't be mistaken 1. What is the default isolation level of Oracle and SQL Server and MySQL? 2. Why is the default isolation level of MySQL RR? ...

Posted by morph07 on Mon, 03 Jan 2022 07:57:10 +0100

When using MySQL, please use JSON as your trump card

Relational structured storage has some disadvantages, because it needs to define all columns and their corresponding types in advance. However, in the process of business development, it may be necessary to expand the description function of a single column. At this time, if the JSON data type can be used well, the boundary between the storage ...

Posted by Jenling on Sun, 02 Jan 2022 21:27:21 +0100

Ten JS tips you don't know

Summed up some commonly used JS tips to make your code more elegant! 1. Use const definition Don't over declare variables in development, and try to use expressions and chain calls. Then, if you can use , const , don't use , let. After you write too much about this mode, you will find that you can hardly find several places to use &quo ...

Posted by Vasudhevan on Sun, 02 Jan 2022 11:49:36 +0100