Python notes: Chapter 1 of Python 3-cookbook (data structure and algorithm)

Each section of Python 3-cookbook discusses the optimal solution of Python 3 in a certain kind of problem by three parts: problem, solution and discussion, or how to better use the data structure, function, class and other features of Python 3 in a certain kind of problem. This book is of great help for deepening the use of Python 3 and improvi ...

Posted on Wed, 19 Feb 2020 08:48:31 -0500 by idevlin

JavaScript asynchronous processing (ES6)

1, What is Promise? Isn't it async/await? Why is Promise mentioned? In fact, async/await is an extension of Promise, so to understand async/await better, we need to understand Promise first. Let's see what Promise is first. First, use console.dir(Promise) in the browser to print out all the properties ...

Posted on Sat, 15 Feb 2020 21:39:07 -0500 by echox

Complete introduction to the usage of qtreewidget and QDockWidget (case analysis)

This section describes the use of QTreeWidget and QDockWidget, as well as the method of displaying pictures with QLabel. The instance samp4  QTreeWidget uses QTreeWidget as the main component to create a photo manager. The interface of the instance runtime is shown in Figure 1. Figure 1 example sa ...

Posted on Wed, 12 Feb 2020 01:04:46 -0500 by abhi_10_20

Solution to the problem of expanding the character string of Luogu P1098

Title Description In the question of "reading program writing results" in the popularity group of the preliminary contest, we have given an example of string expansion: if the input string contains a string similar to "d-h" or "4-8", we will treat it as a kind of shorthand. ...

Posted on Sat, 08 Feb 2020 03:35:06 -0500 by geordie

Markdown extended syntax - special characters

Special character correspondence table When special characters cannot be output normally in some places of Markdown, the corresponding decimal character code can be input (in common cases, for example, space is not convenient for output, in this case, &ා160; can be used instead) character Decimal ...

Posted on Wed, 29 Jan 2020 09:30:59 -0500 by s3rg1o

January 21, 2020 C language cycle learning

January 21, 2020 C language learning 1, continue Skip this cycle and continue with the next cycle Example: cycle the age of five players and count the number of negative age entries (if the entry is correct, skip; if the entry is wrong, add one to the counter) int age; int i; int count = 0;//Counter ...

Posted on Tue, 21 Jan 2020 12:42:59 -0500 by bnmng

Explain ES6 modularity in detail

Explain ES6 modularity in detail In this article, we learn about ES6 modularity, how to export variables, functions, classes from modules and reuse them in other modules. The ES6 module is a JavaScript file executed in strict mode. This means that variables and functions declared in the module are not ...

Posted on Tue, 21 Jan 2020 00:22:27 -0500 by Rommeo

Children learn C language (41): two level pointer and multi level pointer

1, Secondary pointer Pointer to pointer is a form of multi-level indirect addressing, or a pointer chain. Usually, a pointer contains the address of a variable. When we define a pointer to a pointer, the first pointer contains the address of the second pointer, and the second pointer points to the location containing the actual val ...

Posted on Sun, 05 Jan 2020 14:20:03 -0500 by ypkumar

Which characters can be used for up / down triangles (stemless arrows) to display in HTML?

I am looking for an HTML or ASCII character that is an up or down triangle, so it can be used as a toggle switch. I found ↑ (& uarr;) and ↓ (& DARR;) - but their stems were very narrow. I'm just looking for the HTML arrow "head.". #1 building Because you use these arrows for toggle switches, you may want to ...

Posted on Tue, 10 Dec 2019 21:39:50 -0500 by NoSalt

Iterator and Generator

js implements a generator //Analog generator function read(books) { let index = 0 //Return to new object return { //This object is called Iterator //It has a method called next, which returns a result {value,done} every time it calls next next(){ let value = books[index]; index++; ...

Posted on Tue, 10 Dec 2019 07:25:57 -0500 by andrewtayloruk