Summary of Rust Future: the essence of several Future writing methods is the same.

There are many concepts involved in future. Future can be used as a task with multiple strings, and then many tasks will be sent to the thread pool. When the thread is executing, it will block in the block_ The on () call waits for an event. For example, the epoll event will drive the nearest Future::poll(), and then execute the next level of F ...

Posted by allanric on Wed, 27 May 2020 08:31:41 -0700

Full version template project practice [practice]

Today, I'm going to bring you the actual battle of template project. Let's have a look at the renderings explain: Click the picture to jump to the corresponding details page Data: movies = [    {        'id': '34532',        'title': u'Fat action team',        'thumbnail': u'https://img1.doubanio.com/view/photo/s_ratio_poster/public/p ...

Posted by phpfolk2003 on Wed, 27 May 2020 02:25:26 -0700

@The RequestBody parameter has been read. Why?

I don't know if you check the user's allergy. If you don't check, the user belongs to some attack scripts, then our service will be forced! So we first need to read the user's data through the filter for safety verification, which involves an action, that is, we need to read the user's data in the filter for verification, and then release it af ...

Posted by wilorichie on Tue, 26 May 2020 19:27:13 -0700

Python 100 line code easily crawls the 100G set diagram of Meizi net. I hope you have enough memory on your network disk [with source code]

preface Recently, I was doing monitoring related supporting facilities, and found that many scripts are based on python. I heard a long time ago that its name is short of life. I learned python, which is not a joke. With the rise of artificial intelligence, machine learning and deep learning, most of the AI code on the market is written in Pyt ...

Posted by miasma on Tue, 26 May 2020 00:19:00 -0700

20. Use and principle of PageHelper paging plug-in

1. Logical paging and physical paging Logical paging: also called memory paging. Logical paging depends on the code written by the programmer. What the database returns is not the paging result, but all the data, which is then passed by the programmer The code obtains the paging data, takes out all the data, first stores it in memory, ...

Posted by ChetUbetcha on Mon, 25 May 2020 20:53:31 -0700

guava EventBus learning two source codes

Part I This paper introduces the use of event bus in guava package, and deeply understands the implementation details in the source code EventBus understand First of all, we need to look at the EventBus class. There are many comments on the class, which are summarized as follows: Eventbus ensures that subscribers will not be accessed at the sam ...

Posted by porta325 on Mon, 25 May 2020 18:25:41 -0700

[LeetCode] 6-chain list reordering

subject Given a single-chain list L:L 0_L 1..._L-n-1_L-n, Reordering is: L 0_L n_L 1_L n-1_L 2_L n-2... Local algorithm is required without changing the value of the node For example: For a given single-chain list {1,2,3,4}, reorder it to {1,4,2,3}. Here's a good answer Solution-Storage The disadvantage of chain lists is that they cannot be sto ...

Posted by bo0 on Mon, 25 May 2020 10:22:24 -0700

Extensible Use of COLA and Source Code Research

A Preliminary Study on the Use and Design of cola Extension Points Packaging changes provide flexibility to respond to changes in program requirements. Extension point use Steps: Defines an extension point interface, which can be a validator, converter, entity; must end with ExtPt to represent an extension point. For example, I define an exten ...

Posted by web_noob on Mon, 25 May 2020 10:01:16 -0700

Python playing with Excel: automatic function filling and data sorting

In the work, we often use excel to deal with data and display, but for some work we can use the help of programs to achieve efficient problem-solving effect. For example, the json returned from the interface is parsed and saved in Excel, the data in excel is processed according to certain rules and then written into a new EXCEL file, and the co ...

Posted by 3r0ss on Sun, 24 May 2020 23:33:32 -0700

Here are several typical memory overflow cases in Java!

Here are several typical memory overflow cases in Java! Write in frontAs a programmer, more or less will encounter some memory overflow scenarios. If you haven't yet, it means that you may have a relatively short working life, or you are a fake programmer at all! Ha ha, make a joke. Today, we will list several typical memory overflow cases in t ...

Posted by pomme on Sun, 24 May 2020 19:43:06 -0700