• The use of reflection in laravel source code analysis


    preface PHP reflection class is opposite to instantiation object. Instantiation is to call methods and members in encapsulation class, while reflection class is to unpack all methods and member variables in class, including private methods, etc. Just like “unwrapping”, we can call any keyword modified method or member. Of course, it is not recommended to […]

  • SQL Server puzzle: can variables be used in query condition in


    In SQL server query conditions, can variables be used in in? If you can, are there any places or restrictions that need attention? Before answering this question, let’s take a look at this example   IF EXISTS (SELECT 1 FROM sys.objects WHERE name=’TEST’ AND type=’U’) BEGIN     DROP TABLE TEST; END GO CREATE TABLE TEST ( ID INT, NAME […]

  • Getting started with springboot: 02 – Implementing MVC


    In the previous article, we have created entity classes and mapping interfaces. The next thing we need to do is to implement the service layer for processing business logic and the controller layer for controlling process. Create business logic layer Create a service directory in the project and create a new directory UserService.java File: package […]

  • Difference between IOS class method and object method


    Object method [instance object method name] Call Represents an instance method, which is executed within the scope of a specific instance of a class. In other words, you must create an instance of a class before calling this method; Class method [class name method name] Call Represents the class method, which can be called directly […]

  • K8s deploying redis cluster


    Kubernetes deploys single node redis:https://www.cnblogs.com/zisefeizhu/p/14282299.html Redis introduction Redis stands for promote dictionary server, which is an open source in memory data storage, usually used as database, cache or message broker. It can store and manipulate advanced data types, such as lists, maps, collections and sorted collections. Because redis accepts a variety of key formats, it […]

  • Mybatis query error identifying class… Types() or values ()


    We encountered this problem when we learned the relationship of mybatis. Error instantiating class com.springmvc_mybatis.pojo.Items with invalid types () or values (). Instantiate a class with an invalid type () or value() com.springmvc_ mybatis.pojo.items There was an error while reading terms of settlement: Instantiation failed, which indicates that there is something wrong with the constructor […]

  • Interviewer: what’s your understanding of bidirectional binding?


    This is the interview Vue seriesOverall progress:3/33 1、 What is bidirectional binding Let’s start with one-way binding One way binding is very simpleModelBind toViewWhen we useJavaScriptcode updateModelWhen,ViewIt will be updated automatically It’s easy to think of bidirectional binding. On the basis of unidirectional binding, the user updatesView,ModelThe data of is automatically updated, which is called […]

  • 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 […]

  • Realizing studio management background with Vue (3): supporting multilingual internationalization (vue-i18n)


    A series of articles: Vue to achieve studio management background (1): mouse drag and drop to change the window size Vue to achieve studio management background (2): slot to achieve tab tab switching effect, free to fill content Realizing studio management background with Vue (3): supporting multilingual internationalization (vue-i18n) The first version of rxeditor is […]

  • Rust compiles conditionally in cargo


    explain stayRust conditional compilationIn, we briefly introduced conditional compilation, but in the example, we did not show how to compile with cargo. Next, we will introduce how to compile with cargo. Source code //src/main.rs #[cfg(some_condition)] fn conditional_function() { println!(“condition met!”); } fn main() { conditional_function(); println!(“Hello, world!”); } Cargo.toml file stay cargo.toml Add the following […]

  • Preact source code analysis, toxic


    Recently, I read the preact source code and took notes. Here, in the form of an example, I take the execution process of the code to the source code and explain some important points by the way. I suggest you look at the preact source code Vnode and H () A virtual node is an […]

  • Super detailed! Introduction and practice of CODIS


    background In 3.0, redis launched a cluster solution: redis cluster. It allows us to build our redis cluster in an official way. But before, our production environment was based on the instance of redis 2. X version. If cluster management is needed, take vipshop as an example, the solution adopted by many colleagues is Twitter’s […]