Getting started with Python crawler [8]: the third picture of hummingbird Web

Hummingbird net picture The capacity of the previous tutorials is relatively large. Today I write a relatively simple one. It's a hummingbird. I still use aiohttp. I hope you like it.Crawl page` https://tu.fengniao.com The front process is still based on the purpose of learning. Why do I choose hummingbirds? I can't help it. I chose it blindly ...

Posted on Wed, 16 Oct 2019 19:27:06 -0400 by cedtech31

Bzoj2752: [HAOI2012] Expressway (road)

Bzoj2752: [HAOI2012] Expressway (road) The crux of a disgusting question is that it's very confusing to add 1 to subtract 1 from r. So the following r is the r given by the original question, not minus 1. In fact, this question is a false expectation. The answer is to divide the sum of all subintervals of the interval by $C {len} ^ 2 $, and t ...

Posted on Wed, 16 Oct 2019 19:13:01 -0400 by sh0wtym3

Nested transaction of PostgreSQL transaction feature

The implementation of nested transactions is based on SAVEPOINT,ROLLBACK TO SAVEPOINT and RELEASE SAVEPOINT Set a savepoint, which can be rolled back to the savepoint and released. The initial state of the test table is as follows: postgres=# \d test Table "public.test" Column | Type | Modifiers --------+---------+----------- ...

Posted on Wed, 16 Oct 2019 12:31:20 -0400 by cwarn23

Facade of TP5.1 core code analysis

What is the Facade? At present, it is a class that is used to facilitate the static method call of the original class (undefined static method).The specific implementation of Facade is as follows:First look at the core document:\thinkphp\base.php`//Register static proxy of core classFacade::bind([ facade\App::class => App::class, facade ...

Posted on Wed, 16 Oct 2019 05:18:00 -0400 by Fritz.fx

Find the longest 01 equal number of substrings and subsequences in 01 string

https://ac.nowcoder.com/acm/contest/883/B First, change the position of 0 to - 1, and then change the position of 1 to 1, and then count a prefix sum, which is represented by sum[i]. So if we start from the starting point, as long as the substring meets the conditions, then the value of sum[i] is 0. If the starting point of the substring is ...

Posted on Tue, 15 Oct 2019 15:54:03 -0400 by mckinney3

nginx is not perfect

nginx is a high-performance HTTP and reverse proxy server, characterized by less memory and strong concurrency What is reverse proxy? Forward proxy is to pack clients and wear vest, for example, hacker attacks a website, such as Reverse agent is to transfer a vest to the server for packaging, such as nginx Official website: http:/ ...

Posted on Tue, 15 Oct 2019 14:32:24 -0400 by trystan

[focus on nothing] Vue TS daily

This is a very interesting project. Let's see the effect first. The technology used in this project is also interesting. Its technology stack is vue2.5 + typescript + vuex + Vue router Put down the blogger's project address, https://github.com/xiaomuzhu/vue-ts-daily Next, let's look at the project code and study how to use ts in vue. First, the ...

Posted on Tue, 15 Oct 2019 12:21:31 -0400 by morbidchick

Solution to the queue problem of noip2017

Use the segment tree. For the operation of taking a number from the sequence and putting it at the end, we can use array and line tree to solve the problem, as follows: Example: take 5 out of 173573 and put it in the tail. 1 7 3 5 7 3 -- > 1 7 3 ᦉ 7 3 5 (underline means empty) However, when querying the K-th number, you cannot directly acces ...

Posted on Tue, 15 Oct 2019 11:51:31 -0400 by powah

linux operation and maintenance, the way of Architecture - kubernetes 1.13 offline cluster deployment two-way authentication

I. deployment environment 1. Server planning IP address host name CPU Memory 10.0.0.100 k8s-master01 2C 2G 10.0.0.101 k8s-node01 2C 2G 10.0.0.102 k8s-node02 2C 2G 2. Kubernetes 1.13 package download https://github.com/kubernetes/kubernetes/releases ...

Posted on Tue, 15 Oct 2019 11:14:19 -0400 by sonic_2k_uk

maven? Upload to and download from private server

Since the company didn't have maven, it wanted to use it again, so it built a nexus of its own. 1. Upload the local jar file to maven You need to add this in setting.xml in maven of the native (client windows):       <server> <id>releases</id> <username>admin</username> <p ...

Posted on Tue, 15 Oct 2019 10:36:38 -0400 by miro_igov