Write a redux, react redux and the extension of Middleware (asynchronous thunk, printing logger)

The beggar version of the manual roll up is as follows. It only realizes the most basic functions: subscription, dispatch and access. However, it can be used easily. It's no problem to make a counter, and the core functions of redux can be seen more simply and roughly Note: the length of this article is long. It is recommended to read it slowl ...

Posted on Wed, 13 May 2020 22:28:54 -0700 by mady

Security design scheme of third party application obtaining data

In the actual business, it is inevitable to interact and transfer data with the third-party system, so how to ensure the security of data in the transmission process (anti stealing)? In addition to the https protocol, can we add a general set of algorithms and specifications to ensure the security of transmission?   Now let's discuss some com ...

Posted on Tue, 12 May 2020 08:17:32 -0700 by flyingeagle855

Zoj2112 dynamic ratings (overall binary + tree array)

Title Link analysis: This problem has modification operations, so we need to do something about the operation processing: To modify an operation, we will change it into two operations: delete and add scanf("%d%d",&x,&y); tot++; q[tot].x=a[x];q[tot].y=-1;q[tot].type=1;q[tot].id=x; //delete y=-1 tot++; a[x]=y; //Maintenance se ...

Posted on Mon, 11 May 2020 08:55:20 -0700 by charliepage

Don't think of exceptions as business logic; you may not be able to handle them

One: Background 1. Storytelling After years of crawling around the project, you should have seen more or less people handle exceptions as business logic (), such as determining whether a number is an integer.Just wrap it up in try catch and do it againInt.Parse, if you throw an exception it means it's not an integer, it's rude, it doesn't need ...

Posted on Sun, 10 May 2020 16:51:15 -0700 by keyser soze

PEP 468: Preserving Keyword Argument Order

Python 3.6.0 optimized the dictionary. The new dictionary is faster, takes up less memory, and is amazing.Looking at the data on the Internet, most of them point to [Python-Dev] More compact dictionaries with faster iteration This article is creative in outlining the differences between the old dictionary and the new dictionary, as well as the ...

Posted on Tue, 05 May 2020 19:01:48 -0700 by beefy23

Python daily two questions series

Python daily two questions series (December 30) In each question, I will use n methods to solve it, to help you broaden your thinking and practice the program No.1: There are four numbers: 1, 2, 3 and 4. How many three digits that are different from each other and have no repetition? How many are each? Program ana ...

Posted on Tue, 05 May 2020 13:11:49 -0700 by elecktricity

iOS set navigation bar transparency, modify title font color, font size

To make the contrast more obvious, give a background color and paste the key code self.view.backgroundColor = [UIColor yellowColor]; self.navigationItem.title = @"This is a Title"; The display is as shown in the figure: (this is the default of the system, without any modification) FC1A9D02-3E25-4E5B-AEE9-EEAA883629BE.png Set naviga ...

Posted on Tue, 05 May 2020 12:51:54 -0700 by thread_PHP

Atcoder starter competition 166 f three variables game

Atcoder starter competition 166 11690 participants see all questions 11 minutes after the start of the competition Atcoder beginner competition 166 F Three Variables Game See the general catalog for details https://blog.csdn.net/mrcrack/article/details/104454762 Online evaluation address https://atcoder.jp/contests/abc166/tasks/abc166_f I ...

Posted on Tue, 05 May 2020 09:35:18 -0700 by whare

Binary tree printing

subject There is a binary tree. Please design an algorithm to print the binary tree according to the hierarchy. Given the root node root of the binary tree, please return the printing results. The results are stored in an array of each layer. All arrays are arranged from top to bottom according to the number of layers, and the elements in th ...

Posted on Tue, 05 May 2020 07:31:49 -0700 by eideticmnemonic

Common notes

Introducing Commons lang3 dependency Official website The dependency import mode of maven is given <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.8.1</version> </dependency> Correspondingly, if you use gradle to manage pr ...

Posted on Tue, 05 May 2020 02:40:32 -0700 by cjbeck71081