• Promise and future: Secrets of Gemini


    Yongshun Daniel wrote a series of tutorials “no secret under the source code – do the best netty source code analysis tutorial” is the best netty source analysis article I have read so far. But I don’t know why. When I write the third chapter, the author stops the shift. Therefore, I would like to […]

  • Building risk control system, stepping on the road 03 – blocking risk | a CPO experience sharing


    In the last series of articlesRisk analysis of the pit on the road of building risk control systemWe introduce how to analyze these data and produce risk events after collecting information, and the generated alarm has been separated from the business system and can not be used. To put it bluntly:The analysis of things can […]

  • Leetcode 415. String addition | Python


    415. String addition Source: leetcode https://leetcode-cn.com/problems/add-strings subject Given two non negative string integers num1 and num2, calculate the sum of them. be careful: The length of num1 and num2 is less than 5100 Num1 and num2 contain only numbers 0-9 Neither num1 nor num2 contains any leading zeros. You can’t use any of the built-in […]

  • Summary of numpy


    A chestnut >>> import numpy as np >>> a = np.arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> a.shape (3, 5) >>> a.ndim #The number of axes of an array. In the python world, the number of axes is called rank […]

  • Hadoop’s “Hello world” — wordcount


    After installing and configuring the Hadoop environment, you need to run an instance to verify whether the configuration is correct. Hadoop provides a simple wordcount program, which is actually a program for counting the number of words. This program can be regarded as “Hello world” in Hadoop. MapReduce principle In fact, MapReduce uses the idea […]

  • Simple implementation of Baidu translation by Python crawler


    Series of articles: Simple implementation of Baidu translation by Python crawler Python crawler music Simple crawling of bleeding skin Simple crawling of little skin on MC skin station of Python crawler Python crawler to send the weather forecast of the day to learnku friends Python crawler automatically switches the daytime / nighttime mode of learnku […]

  • Graphic SQL, this is too image!


    Author Tony, who doesn’t cut her hairSource https://blog.csdn.net/horses/… This paper introduces the design idea of relational database: everything is relational in SQL. There are many great design concepts and ideas in the computer field, such as: In UNIX, everything is a file. In object-oriented programming languages, everything is an object. The same is true of […]

  • The difference between login and non login shell


    Shell is the interface that Linux uses to send the user‘s input instructions to the kernel, and returns the results of the kernel’s execution instructions to the output. Here we use bash shell as an example. Shells can be divided into two types: login shell and non login shell. The two types execute different scripts […]

  • Insertion sort algorithm


    The insert sort pair divides the array into sorted and unsorted parts. Generally, the left side is sorted and the right side is unsortedThen the first element of the unsorted sequence is taken as the element to be inserted, and then the sorted sequence is traversed,Note that we have to traverse the sorted sequence from […]

  • The detailed process of realizing promise (implementing the most complete promise constructor)


    1、 Create promise constructor infrastructure Get status Status =’pending ‘initialization ‘resolved ‘obtained Failed to get ‘rejected’ Initial data data = undefined Container function definition failed onResolved = undefined onRejected = undefined Define success / failure function resolve / reject A kind of this.status Change status to obtained / get failed A kind of this.data Save […]

  • How to find the intersection, union, difference and symmetric difference set of the set in Python.


    In fact, intersection, union, difference and symmetric difference sets are also special operations of sets. A & B: the common element of two sets of intersection table, equivalent to A. intersection (b) A | B: Union table all elements of two sets, equivalent to A. Union (b) A-B: elements of difference table belonging to a […]

  • React advanced use


    Uncontrolled components unavailablesetStateUse uncontrolled components to get the desired results, such as file uploads Portal Function: let the component render outside the parent component Usage scenarios: overflow: hidden Parent componentz-indexThe value is too small fixedPut inbodyThe first level of ReactDOM.createPortal( <div className=”modal”>{this.props.children}</div>, document.body ); Context const ThemeContext = React.createContext(‘light’) <ThemeContext.Provider value={this.state.theme}> <A /> </ThemeContext.Provider> //Class […]