Introduction to Python crawler: how to pick up Web pages in Python? What is the basic process
Basic process of Python crawler web page:First, select some carefully selected seed URL s.Put these URLs into the URL queue to be fetched.Read the URL of the queue to be crawled from the URL queue to be crawled, resolve DNS, obtain the IP of the host, download the web page corresponding to the URL and store it in the downloaded Web page library ...
Added by fred_m on Fri, 21 Jan 2022 00:44:06 +0200
[JavaSE] Chapter 11 generics
11.1 role of generics
11.1.1 concept of generics
The so-called genericity is to allow an identifier to represent the type of an attribute in a class or the return value and parameter type of a method when defining a class or interface. This type parameter will be determined when used (for example, inheriting or implementing this interface, d ...
Added by intenseone345 on Thu, 20 Jan 2022 23:55:33 +0200
Lazy Gospel! One line of code to import all Python Libraries
Recently, when consulting some questions, some small partners found that many small partners did not know "opportunism" in the process of practical operation. That is the so-called "laziness". The laziness mentioned here is not the traditional laziness and trickery, but learning to "use tools". You should know that ...
Added by leon_nerd on Thu, 20 Jan 2022 22:59:44 +0200
python file operation
Basic operation of file
Open / close file The built-in function open can open a file under the specified path and return a file object There are two most commonly used parameters for open. The first parameter is the file name (absolute path or relative path), The second is the opening mode, 'r' /'w '/'a' /'b ', which means read (default) / ...
Added by gijs25 on Thu, 20 Jan 2022 21:55:15 +0200
Detailed analysis of classical dynamic programming problem: Principle Analysis and solution implementation of shortest editing distance algorithm
Basic concepts
Edit distance issue:
It is difficult to edit the distance problem, but the solution is very beautiful, and it is also a rare practical algorithmEdit the distance usage scenario:
For revising the misplaced content of the article The article can only be modified by 20 words, and supports adding, deleting and replacing oper ...
Added by sw9 on Thu, 20 Jan 2022 20:18:55 +0200
Detailed explanation of Java process control
java process control
I User interaction Scanner
scanner object
Scanner class to get user input Basic grammar //Create a scan object to receive keyboard data
Scanner scanner=new Scanner(System.in);
System.out.println("use next Reception mode:");
//Judge whether the user has entered a string
if (scanner.hasNext()){
//Receive in next mode
...
Added by imamferianto on Thu, 20 Jan 2022 19:45:32 +0200
Template method pattern
Template method pattern
purpose
Template method: when the steps are determined and fixed, the details of each step are differentiated in multiple subclasses through polymorphic mechanism, which is the effect that template method can achieve;
classification
Template method mode: it belongs to behavior mode in design mode;
Specific examples ...
Added by daedlus on Thu, 20 Jan 2022 19:00:22 +0200
SpringBoot asynchronous requests and calls
From: Micro reading https://www.weidianyuedu.com/content/0117397506434.html
1, Use of asynchronous requests in Spring Boot**
1. Asynchronous request and synchronous request
Synchronization request
Asynchronous request
Features: you can first release the threads and related resources allocated by the container to the request, reduce ...
Added by borris_uk on Thu, 20 Jan 2022 16:50:21 +0200
Fully understand the static keyword
Preface: we often use the static keyword in Java, so many times we don't know when to use the static keyword, and what is the relationship between the internal logic used by the static keyword and the object? So today we'll talk about the static keyword and understand it in essence.
Static: static static can be used to modify: attributes, me ...
Added by pkallberg21 on Thu, 20 Jan 2022 14:36:44 +0200
Enumeration classes in Java
The following are my notes on watching the Java learning video of shangsilicon valley
Enumeration class
Class has only a limited number of objects, which is uncertain. Examples are as follows:
Monday, SundayGender: man (male), woman (female)Season: Spring Festival... WinterPayment methods: Cash (cash), WeChatPay (WeChat), Alipay (Al ...
Added by Xurion on Thu, 20 Jan 2022 14:07:51 +0200