Crawler 02 urlib usage

urllib urllib is a built-in HTTP request Library in python. I don't think it's commonly used now. It's not easy to use, but I know the basis of crawlers Four modules urllib.request: request moduleurllib.error: exception handling module (ensure that the program will not terminate unexpectedly)urllib.parse: url parsing module (split, merge, etc. ...

Added by play_ on Fri, 18 Feb 2022 01:00:08 +0200

Concurrent linkqueue Java programming

brief introduction In concurrent programming, we sometimes need to use thread safe queues. If we want to implement a thread safe queue, there are two ways to implement it, one is to use blocking algorithm, the other is to use non blocking algorithm. The queue using blocking algorithm can be implemented by one lock (the same lock for queue entr ...

Added by freddyatlantis on Fri, 18 Feb 2022 00:50:27 +0200

Day2 --- 3 Longest substring without duplicate characters

2021.5.4 Title: Given a string, please find the length of the longest substring that does not contain duplicate characters. Example: input: s = "pwwkew" output: 3 explain: Because the longest substring without duplicate characters is "wke",So its length is 3.      Please note that your answer must be the length of the substring,"pwke" It' ...

Added by ratcateme on Fri, 18 Feb 2022 00:47:32 +0200

Reentrant function

1, What problems can asynchronous IO of global variables cause? The parent and child processes are accumulated separately: #include <stdio.h> #include <signal.h> #include <unistd.h> #include <stdlib.h> // The parent-child processes accumulate n respectively // Send signals to each other every 1 second to inform ac ...

Added by FlashbackJon on Fri, 18 Feb 2022 00:40:34 +0200

Source code analysis of ArrayList and LinkedList

ArrayList and LinkedList design structure Note: The green solid line is the inheritance relationship between interfacesThe green dotted line is the class implementation interface relationshipBlue implementations are inheritance relationships between classes 1. ArrayList design structure 2. LinkedList design structure 3. Analyze the str ...

Added by Danosaur on Fri, 18 Feb 2022 00:35:48 +0200

Spring learning notes [All]

Learn about Spring Official website: https://spring.io/projects/spring-framework#learn Official download address: https://repo.spring.io/ui/native/release/org/springframework/spring GitHub: https://github.com/spring-projects/spring-framework <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency&g ...

Added by ultrus on Fri, 18 Feb 2022 00:25:43 +0200

Python branches and loops

Branch and loop Process control - controls the sequence of code execution Sequential structure: the code is executed from top to bottom, and each statement is executed only once. (default) Branch structure: select whether to execute or not to execute part of the code according to the conditions. (use if) age = int (input("Please enter your ...

Added by Coldman on Fri, 18 Feb 2022 00:23:00 +0200

Integrated java and scala development environment using maven

Git address: https://gitee.com/jyq_18792721831/sparkmaven.git Create Project Let's start by creating a generic maven project Create a project followed by a hello module Is also a normal maven module Increase scala dependency We don't write code in the parent project, the parent project is just for managing the child project, so th ...

Added by ahundiak on Fri, 18 Feb 2022 00:15:40 +0200

Ten classical sorting algorithms

introduction: Sorting algorithm is one of the most basic algorithms in data structure and algorithm. Here are ten classic sorting algorithms to explain. Taoist friends who don't know can come here to sweep away their blindness. From "rookie tutorial". explain    sorting algorithms can be divided into internal sorting ...

Added by Cloud9247 on Fri, 18 Feb 2022 00:03:49 +0200

Codeforces Round #719 (Div. 3) A - E problem solution

A. Do Not Be Distracted! Original title link: https://codeforces.ml/contest/1520/problem/A General idea of the topic If such as aaaaadddbbfgh, each letter appears only once continuously, then YES is output; otherwise, if such A as AABBA appears twice or more continuously in different positions, NO is output #include <iostream> # ...

Added by sargenle on Fri, 18 Feb 2022 00:01:43 +0200