Tag:copy
-
Time:2021-1-18
Object.assign() Object.assign The () method is used to assign the values of all enumerable properties from one or more source objects to the target object. It will return the target object.Object.assign Method copies only the enumerable properties of the source object itself to the target object. This method uses [[get]] of the source object and […]
-
Time:2021-1-16
Kafka is an excellent distributed message queue, which is famous for its high throughput and excellent performance. 1、 Explanation of related terms Broker: a physical entity that stores messages. It is stateless and can be deployed in multiple extensionsTopic: a set of messagesPartition: a message partition of a class of messages. A topic has multiple […]
-
Time:2021-1-16
Indexes 1. Object deep copy 2. Online pictures to Base64, online pictures Click to download 3. Object deep copy 4. Object deep copy 5. Object deep copy 6. Object deep copy 1. Deep copy of objects (first level attribute copy and multi-level nested attribute copy) //Deep copy function (satisfying multi-level nesting of attributes) Function deepcloneobj […]
-
Time:2021-1-15
High availability High Availability Mechanism Kafka before 0.8 does not provide high availability mechanism. Once a broker goes down, all partitions on the broker will not be available during the outage. From version 0.8, Kafka began to provide high availability mechanism.Kafka’s high availability is guaranteed by multi replica mechanism. The partition under each topic has […]
-
Time:2021-1-12
1. Object.assign() Object.assign () is used to copy the values of all enumerable properties from one or more source objects to the target object. Grammar:Object.assign(obj, …sources) Obj: target object Sources: source objects, which can be multiple Return to target object Copy an object const obj = { a: 1 } const copy = Object.assign({}, obj) […]
-
Time:2021-1-12
The data immutability principle of state in react. Why is it so designed?Because in the life cycle of react, every call to componentshouldoupdate() will compare the existing data of state with the data to be changed, update the changed data, minimize unnecessary updates, and achieve performance optimization. Therefore, it is not recommended to change the […]
-
Time:2021-1-11
Process explanation After we send the message through the code, the message will be sent to interceptor The interceptor processes the data Encryption / decryption / desensitization Filter the data that does not meet the conditions (IP white list, error code, dirty data or incomplete data) Statistics of message delivery success rate or calculation of […]
-
Time:2021-1-7
1 Introduction Sequoiadb (Jushan database) is a distributed non relational document database, which can be used to access massive non relational data. Its bottom layer is mainly based on distributed, high availability, high performance and dynamic data type design, and is closely integrated with the current mainstream distributed computing framework Hadoop. Sequoiadb takes into account […]
-
Time:2021-1-4
C++ Temporary objects That is, temporary variables, which are generated by the system and when writing code, can be reduced by optimizing the code The stack often stores temporary variables, and the temporary variables on the stack are generated automatically by the system The space generated by using new must be released by using delete […]
-
Time:2021-1-4
catalog How to get object descriptor in es8 Set descriptor to use defineproperty () Gets the descriptor of a single property—— Object.getOwnPropertyDescriptor () Get all the data descriptors in the attribute—— Object.getOwnPropertyDescriptors () descriptor Descriptor reference You can copy the getter and setter properties Es6-es10 learning map How to get object descriptor in es8 Object.getOwnPropertyDescriptor()Only […]
-
Time:2021-1-4
Increase the number of copies of miner profit topic from one to three replication.json { “version”: 1, “partitions”: [ { “topic”: “miner-profit”, “partition”: 0, “replicas”: [ 1, 2, 3 ] }, { “topic”: “miner-profit”, “partition”: 1, “replicas”: [ 1, 2, 3 ] }, { “topic”: “miner-profit”, “partition”: 2, “replicas”: [ 1, 2, 3 ] } […]
-
Time:2021-1-3
C++ Move constructor and move assignment operator It mainly solves the problem of efficiency in program writing Moving is not to move the data in memory to another address, but to change the owner of the data The copy constructor is a left value reference & the move constructor is a right value reference&& The […]