• NVM switches the version of node


    In some strange cases, the node version that a project depends on is different from your local node. At this time, you have several methods, and it is feasible to test yourself! Just sort out the blog you are looking for, so that you can check it later 1. Uninstall your local node, and then […]

  • C# (IX) Fundamentals – static members and exception handling


      C# If you have a book to summarize and correct, please use it to consolidate your knowledge     Static member When you define the class member attribute or method, add static, that is, it is a static member. The static member can not be referenced by the object of the class. The value […]

  • Three styles of penetration


    problem Many Vue commonly used component libraries (element, vant, vuetify) are used. Although the style is configured, other styles still need to be changed solve Three styles: penetration > > >,: v-deep, / deep/ In style, the scoped attribute is often used to privatize components, so style penetration is needed Note: (> > > only […]

  • Implementation of three singleton modes (c + +)


    Today, I mainly learned three implementations of singleton mode, including lazy type, double check lock lazy type and hungry type. First of all, we should understand the concept of singleton pattern. Singleton pattern simply means that a class is allowed to have only one object. Therefore, we can know that we must control the construction […]

  • Single case mode can also play flowers


    1、 Singleton mode 1. What is singleton mode (1) Singleton mode [singleton pattern:] definition: Ensure a class has only one instance, and provide a global point of access to it. Ensure that a class has only one instance and provide a global access point to it (only instance objects are allowed to be obtained through […]

  • $releasever and $basearch variables in Linux system yum


      Yum’s configuration file contains a large number of $releasever and $basearch variables. What are their values? Why bother with this thing? The network in some places is a privatized network. There are a large number of Linux servers, including various versions. At this time, in order to facilitate deployment and installation, it is necessary […]

  • Cloud writing service privatization deployment scheme: version library privatization


    Service Introduction Top think cloud writing service from the originalSee cloud document writing serviceIndependently, after accumulating more than 6 years of iteration and experience, we redesigned and constructed a new cloud writing service, adhering to the simplified and practical design concept to better meet the writing needs and use scenarios. The independent cloud writing service […]

  • Singleton design pattern


    Singleton: a class can have only one instance object; How to implement singleton?1) Hungry man style: no matter whether the user needs the object or not, the object is created first; //① Enumeration public class SingletonPattern1 { public static void main(String[] args) { SingleEnum singleEnum1 = SingleEnum.INSTANCE; SingleEnum singleEnum2 = SingleEnum.INSTANCE; System.out.println(singleEnum1==singleEnum2);//true } } enum […]

  • Several writing methods of single case mode


    Key points of single case mode Private constructor Private static reference to instance Public static method of getting instance object Starvation mode (non thread safe) public class SingleTon { Private singleton() {} // private constructor private static final SingleTon singleTon=new SingleTon(); public static SingleTon getInstance(){ return singleTon; } } Lazy mode (non thread safe) public […]