• C + + learning records (V) — a preliminary study of C + + class model


    Concept of class Conceptually speaking, class is the abstraction of food with common characteristics in reality. Here is a simple example: we now need to define a human class. So we need to find out the common ground between people (or the commonness of people in this species). People have height, weight, age, gender… These […]

  • Sorting out basic knowledge points of C \ C + + (II)


    Can local variables have the same name as global variables? A: you can have the same name. If the local variable and the global variable have the same name, the same identifier accessed in the function by default represents the local variable. If you want to access the global variable, you can add:: in front […]

  • Etcd check failed when k8s adds a new master node


    Background: Yesterday, after a new cluster was established, a new problem occurred. One of the master nodes could not work normally. Although it can be used normally, there is a single point of failure. Today, etcd health check failed during repair. Yesterday, after a new cluster was established, a new problem a problem occurred, and […]

  • Practical interpretation of distributed system – detailed explanation of high cohesion and low coupling


    Summary:To do a good job in high cohesion and low coupling, the idea is also very simple: define responsibilities, classify and draw boundaries. You may feel familiar with the following scene (brother Z, I’m going to play again): Brother Z:@All brothers and sisters, I have a need to add an audit to the “product on […]

  • Brief analysis of Flink sort shuffle reading process


    1. Creation and use of sortmergeresultpartition The first is a call chain of a read procedure PartitionRequestServerHandler.channelRead0() ->CreditBasedSequenceNumberingViewReader.requestSubpartitionView() ->ResultPartitionManager.createSubpartitionView() ->SortMergeResultPartition.createSubpartitionView() ->SortMergeResultPartitionReadScheduler.crateSubpartitionReader() ->createFileReader()->new PartitionedFileReader() The creation of sortmergeresultpartition can be seen from the previous article that sortmergeresultpartition is created in resultpartitionfactory. First, create the call chain for the sortmergeresultpartition object: new Task() ->NettyShuffleEnvironment.createResultPartitionWriters() ->ResultPartitionFactory.create() After that, […]

  • MySQL joint table quick query


    Suppose there are the following two tables: A: id age 1 11 2 12 3 13 4 14 B: id name 2 aaa 3 bbb 4 ccc 5 ddd Inner join There is only one application scenario, inner join or join, which is equivalent to inner join select a.*,b.* from a inner join(join) b on a.id […]

  • What is the function of this keyword?


    When a class defines a member method, local variables and member variables can have the same name, but member variables cannot be accessed at this time. To avoid this situation, Java provides the this keyword, which represents the current object and points to the calling object itself. Next, demonstrate the essence of this   1 class […]

  • Redis basic operation – set


    Redis set is an unordered set of string type. Collection members are unique, which means that duplicate data cannot appear in the collection. Collections in redis are implemented through hash tables, so the complexity of adding, deleting and searching is O (1). The maximum number of members in the collection is 232 – 1 (4294967295, each […]

  • Redis basic operation – sorted set


    Redis ordered collections, like collections, are collections of string elements, and duplicate members are not allowed. The difference is that each element is associated with a score of type double. Redis sorts the members of the collection from small to large through scores. Members of an ordered set are unique, but scores can be repeated. […]

  • Array extension


    Array extension Expand operator Array.from() Array.of() find(),findIndex() fill() entries(),keys(),values() includes() flat() Expand operator console.log(…[1, 2, 3]) // 1 2 3 console.log(1, …[2, 3, 4], 5) // 1 2 3 4 5 […document.querySelectorAll(‘div’)] // [<div>, <div>, <div>] Array.from() The array.from method is used to convert two types of objects into real arrays: array like objects and […]

  • Understanding objects in Objective-C


    This article is published to personal blog synchronously. For a better reading experience, please visit here OC is a superset of C language, which provides object-oriented capability. But what is our Object-Oriented Object in OC, or how does it behave in memory? Today, let’s talk about Tao. Object understanding First, solve the problem of what […]

  • Teach you how to use the reflect package to parse the structure of go – step 2: structure member traversal


    Last articleWe learned how to check the type of a parameter with reflect. In this article, we have obtained a structure type, so we need to explore the internal structure of the structure and its corresponding value. Structure member iteration In the last article, our Marshal function looks like this: func marshalToValues(in interface{}) (kv url.Values, […]