Tag:method

  • State, mutation, action, getter and module of vuex

    Time:2020-12-1

    Describe the use and relationship of state, mutation, action, getter and module of vuex,Give examples to illustrate how they are used. 1. Store data state global data as long as it is changed, all the places used will change2. Change data (synchronous) mutation change state by submitting commit3. Change data (asynchronous) action can not be […]

  • Why does spring use level 3 caching to solve circular dependency?

    Time:2020-12-1

    Focus on “Su San Shuo technology”, reply: there are surprises in development manual and time management. Maybe some friends don’t know about spring’s circular dependency. Let’s take a look at this example first. @Service public class AService { private BService bService; public AService(BService bService) { this.bService = bService; } public void doA() { System.out.println(“call doA”); […]

  • Usage of SQL server to replace not in

    Time:2020-12-1

    select * from T_A a (nolock) where a.xh not in (select xh from T_B) Method 1: little effect select * from T_A a (nolock) where not exists (select xh from T_B where xh=a.xh) Method 2: the effect is better than expected. select * from T_A a (nolock) left join T_B b on b.xh=a.xh where b.xh is null

  • [k8s Series 2] spark on k8s (kubernetes) dynamic resource allocation (DRA)

    Time:2020-12-1

    With the advent of the era of big data and the growing popularity of kubernetes, many companies have moved the spark application from yarn to k8s, of course, they have also stepped into a lot of holes, Now let’s analyze the dynamic resource allocation of spark on k8s Note: This paper is based on spark […]

  • Dealing with sudden failure of public CDN

    Time:2020-12-1

    Use of public CDN When I started to develop my blog, I used bootcdn and found that they were hacked. Although we want to scold those “hackers”, we have no way to prevent them. We can only solve the problem from our own website. At that time, I didn’t have the technology to solve this […]

  • (1) Three implementations of – springboot2 – applicationcontextinitializer

    Time:2020-12-1

    The first implementation methodMETA-INF/spring.factories step1: ImplementationApplicationContextInitializerInterfacestep2: resources create in the resource file directory:META-INF/spring.factories, configure key and value as: interface class = implementation class example:(1) . implement applicationcontextinitializer package com.niewj.fileman.initialized; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.annotation.Order; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MapPropertySource; import java.util.HashMap; import java.util.Map; /** * @Author weijun.nie * @Date 2020/4/27 8:00 * @Version 1.0 */ […]

  • Django’s data validation objects

    Time:2020-12-1

    In Django, there are two ways to verify data: one is through form validation, the other is through model validation. In, I made a note of the validation method in the model. All content is based on Django 1.10Official website documentIt’s organized validating objects Trigger of data verification: Validation in model is done by callingModel.full_clean()Method. […]

  • Best of the year sync.Map Detailed explanation

    Time:2020-12-1

    In our work, we often encounter the situation that the map is read and written concurrently, which results in the panic. Why do we have the panic when reading and writing the map concurrently? Because in the case of concurrent read and write, the data in the map will be written disorderly, and thenGarbage in, […]

  • How much do you know about generics after all these years of using them?

    Time:2020-11-30

    Modern programmers write code, no one dares to say that they have never used generics. This generic template t can be replaced by any type you want. It’s really magic and magical. Many people are used to it. But it’s so interesting how the bottom layer of generic t helps you realize it. I’ll try […]

  • 03 – create springboot project based on idea and do entry analysis

    Time:2020-11-30

    Background analysis of spring boot Java EE application system has been criticized by developers for its heavy configuration, low development efficiency, high difficulty of tripartite integration and complex deployment process. Even if spring is used as a lightweight resource integration framework, it still needs a lot of manual dependency management and complex XML configuration (which […]

  • Upload callback and other problems in kindeditor

    Time:2020-11-30

    September 15, 2020I’m sorry, my problem. There are official documents and interface documents. I haven’t been working well recently. I’m so angry.Upload file address:Upload files The company uses kindeditor as a rich text editor.. The original editor MD is usedTo be honest, it’s not that good. API documentation is incomplete, and there are many problems. […]

  • Remember the optimization of MySQL using in large amount of data

    Time:2020-11-30

    MySQL version number is 5.7.28, and table a has 390W records. InnoDB engine is used. The varchar type field MAC has been indexed, and the index method is B-tree. Table B has only 5000 + records. A SQL instruction is written as follows:Select * from a where MAC in (“AA: AA: AA: AA: AA: AA”, […]