Starting from single testing, improve the underlying API effect function in the Vue3 source code

Based on the effect method implemented in the previous article, based on the single test in the Vue3 source code, three functions of this method are improved, namely: runner: effect can return a self-executing parameter runner function scheduler: effect supports adding the scheduler function in the second parameter option stop: effect Adds stop function runner […]

The underlying principle of ArrayList

1. Data structure of ArrayList The underlying data structure of ArrayList is an array. The type of array elements is Object type. All operations on ArrayList are based on arrays. 2. Thread safety of ArrayList The operation of adding elements to ArrayList is carried out in two steps, that is, the first step is to […]

10. C++ operator overloading

1. Operator + overloading #include <iostream> #include <string.h> #include <unistd.h> using namespace std; class Point { private: int x; int y; public: Point() {} Point(int x, int y) : x(x), y(y) {} int getX(){ return x; } int getY(){ return y; } void setX(int x){ this->x = x; } void setY(int y){ this->y = y; […]

[Analysis of Spring’s underlying core architecture concepts]

Article directory 1. BeanDefinition 2. BeanDefinitionReader 2.1. AnnotatedBeanDefinitionReader 2.2.XmlBeanDefinitionReader 5. ClassPathBeanDefinitionScanner 6. BeanFactory 7. ApplicationContext 7.1. AnnotationConfigApplicationContext 7.2. ClassPathXmlApplicationContext 8. Type conversion 8.1.PropertyEditor 8.2.ConversionService 8.3. TypeConverter 9. FactoryBean 10. ExcludeFilter and IncludeFilter 11. MetadataReader, ClassMetadata, AnnotationMetadata Prepare the test object User in advance: public class User {<!– –> public User(int flag, String uuid){<!– –> System.out.println(flag […]

14.1 Operator overloading

Table of Contents 1. How to overload operators 1. Non-member function overloading 2. Member function overloading 2. Support overloaded operators 3. Overload restrictions 1. There must be a class type parameter 2. No short circuit characteristics 3. Priority and combination 4.Default actual parameters are not supported 4. Overloading principle 1. Do not redefine operators with […]

Collection framework: characteristics of Set collection, underlying principles of HashSet collection, hash table, implementation of deduplication

Characteristics of Set collection Set is an unordered, non-repeating data structure. Its characteristics are as follows: 1. The elements in the set are unordered: The elements in the Set have no order and cannot be accessed through indexes. 2. The elements in the set are unique: Duplicate elements are not allowed in the Set, and […]

Message queue + how to ensure that messages are not lost + how to ensure the orderliness of messages + how to deal with message accumulation

1. Basic concepts of message queue The message queue model is divided into: queue model and publish/subscribe model. Introduction to the queue model: Producers send messages to queues. A queue can store messages sent by multiple producers, and a queue can also have multiple consumers. There is a competitive relationship between consumers, that is, each […]

HDU 1686: Oulipo ← KMP algorithm (overlapping calculations)

[Source of the question] [Title description] The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’affirmait faux. Tout avait Fair normal, d’abord, puis surgissait l’inhumain, l’affolant. son tapis, assailant […]