Python 3 standard library: zlib GNUzlib compression
1. zlib GNUzlib compression
Zlib module provides the underlying interface for many functions in the zlib compression library of GNU Project.
1.1 processing data in memory
The simplest way to use zlib requires that all data to be compressed or decompressed be stored in memory.
import zlib
import binascii
original_data = b'This is the original ...
Posted by zippers24 on Fri, 27 Mar 2020 10:20:54 -0700
Introduction and use of ZeroMQ
What I wrote last time Introduction and use of ZeroMQ (1)
Pipeline pattern
PipeLine mode is used for task allocation, usually in multi-level PipeLine, one or several nodes push the work to many workers, and then push the results to one or several collectors in turn. This pattern is reliable in most cases, because it does not drop messages un ...
Posted by |Adam| on Thu, 26 Mar 2020 02:15:09 -0700
MySQL data backup and recovery -- xtrabackup tool
The previous article introduced the logical backup tool mysqldump. This article will demonstrate the second part of data backup and recovery by using xtrabackup, a more popular physical backup tool.
1. Installation of xtrabackup tool
1.1 installation dependency package
/* xtrabackup You need to install the related dependency package to use th ...
Posted by blear on Wed, 25 Mar 2020 05:45:51 -0700
Python 3 reptile (15) agent
Infi-chu:
http://www.cnblogs.com/Infi-chu/
1, Set up proxy
1.urllib
#HTTP proxy type
from urllib.error import URLError
from urllib.requests import ProxyHandler,build_opener
proxy='127.0.0.1:9743'
# proxy='username:password@127.0.0.1:9743 'username and password are placed at the beginning
proxy_handler=ProxyHandler({
'http':'http://'+proxy,
...
Posted by minus4 on Fri, 20 Mar 2020 08:45:12 -0700
netty realizes group chat
[overview]
Implement a group chat tool. The client messages participating in the chat are broadcast through the server.
It mainly consists of two parts: chat server and chat client.
Chat server function overview:
1. Monitor the access and disconnection of all clients
2. When client A accesses the chat room, send the access message to other clie ...
Posted by jonners on Tue, 17 Mar 2020 09:14:13 -0700
Error handling in lua learning
error handling
dynamic link
In Lua, dynamic links are considered the parent of all other mechanisms
So you can use it to dynamically load any other mechanism not in Lua
Two parameters required for package.loadlib
Full path to the library
Correct function name
The loadlib function loads the specified library and link ...
Posted by mchip on Thu, 12 Mar 2020 21:54:50 -0700
Getting started with Netty and unpacking
Netty programming
NIO programming
1. Solve the thread resource limitation
2. Low efficiency of thread switching
3. Resolve that IO read and write are in bytes
Netty programming
1. Introduction to netty
2. Use of netty
Netty package sticking and unpacking:
1. Sticking problem:
2. unpack
Specific ...
Posted by tapdancingtenor on Thu, 12 Mar 2020 05:22:10 -0700
Embedded Linux development network device driver
0. Preface
It's been a while since I left my job. The epidemic hasn't passed yet. If I can't go out, I still don't go out. I feel like I've been living a long time every day. I haven't found a job yet. I'm just looking for LDD3 recently. I transplanted the AR8031 driver from my previous job. I just to ...
Posted by davidlenehan on Thu, 12 Mar 2020 03:41:52 -0700
c + + communication evolution level 1 -- single thread synchronous blocking communication
This article records an example of using socket to communicate on windows. The code comes from the Internet. As time goes by for a long time, I didn't bookmark at that time, and now it's not easy to find a source. Some key code fragments are given in this paper. On the one hand, they are used to cons ...
Posted by Daukan on Tue, 10 Mar 2020 04:33:44 -0700
php implementation of websocket real-time message push
1, Brief introduction of socket protocol
What is WebSocket and what are its advantages
WebSocket is a persistent protocol, which is relative to http non persistent. Application layer protocol
For example, the life cycle of http1.0 is defined by request, that is, a request and a response. For HTTP, this session between client and server ends ...
Posted by edontee on Tue, 10 Mar 2020 03:01:08 -0700