Reading notes: Both repr and str are used for display. str is user oriented, while repr is programmer oriented.
repr means representation and description.
To display objects using print(Object), you need to refactor str. To directly input class objects for printing, you need to refactor the repr.
In python, str is us ...
Posted by wing_zero on Tue, 05 May 2020 08:20:42 +0200
LeetCode -- longest substring without duplicate characters
The information in this article comes from the Internet and personal summary, which is intended to summarize personal learning and experience. If there is any infringement, please contact me to delete it. Thank you!
leetcode Question, Interview 48
The longest ...
Posted by calevans on Sun, 03 May 2020 05:39:23 +0200
Installation environment: CentOS release 6.5 (Final) 64 bit
1. Install Python
Python 2.6 comes with CentOS, but pip does not support this version. You need to upgrade Python to 2.7 first, and python 2.6 is required for yum, so Python needs to coexist with 2.6 and 2.7
# Install compilation tools and dependency Librari ...
Posted by free2code on Sat, 02 May 2020 08:38:18 +0200
[notice: All Rights Reserved. Please reprint. Do not use for commercial purposes. Contact email: firstname.lastname@example.org]
Because there are not many opportunities to write multiple processes, we do not pay much attention to this aspect. Therefore, the multi process code has not been mastered. In fact, from the bottom of my heart, I know that mu ...
Posted by gabereiser on Sat, 02 May 2020 05:18:09 +0200
Please indicate the source of the reprint: http://blog.csdn.net/l1028386804/article/details/78845722
Imagine an environment where you can access an SSH server on your intranet and you also want to access a Web server on the same segment.You cannot access the Web server directly, but SSH servers can access the Web server and there are no tools ...
Posted by k994519 on Fri, 01 May 2020 11:11:52 +0200
1.flask specific variables and functions:
Variables: g, session, request, config
Functions: URL for(), get flashed messages(), please pay attention to this function. Remember that it is a function. Don't forget to write brackets!!!!!!!!!
I don't need to talk much nonsense. I'll go straight to the code to experience it:
First, explain a bug. Whe ...
Posted by keith73 on Fri, 01 May 2020 11:01:27 +0200
Suppose you have installed bs4 requests
This novel is chosen at will, so you don't have to worry too much
Python 3 implementation. There are too many crawlers using Python 2 on the Internet, but there are still few crawlers using Python 3
The link is https://www.qu.la/book/12763/10664294.html
Get the title of the article (find the exact htm ...
Posted by hnissani on Fri, 01 May 2020 10:30:06 +0200
Case: multi task udp chat
Write a program with two threads
Thread 1 is used to receive data and display
Thread 2 is used to detect keyboard data and send data through udp
Achieve the above requirements
Summarize the characteristics of multitask program
def send_msg(udp_socket) ...
Posted by ViperSBT on Thu, 30 Apr 2020 22:54:03 +0200
Please indicate the source of Reprint: http://blog.csdn.net/l1028386804/article/details/78965865
Most of DNS resolution is a domain name corresponding to an IP address, but through DNS polling technology, a domain name corresponding to multiple IPS can be achieved, so as to achieve the simplest and most efficient load balancing. However, the b ...
Posted by charlesg on Thu, 30 Apr 2020 20:59:38 +0200