TCP socket heartbeat packet sample program

When developing games, you often need to implement your own heartbeat mechanism at the application layer, that is, regularly send a custom structure (heartbeat packet) to let the other party know that you are still alive to ensure the validity of the connection. In the TCP socket heartbeat mechanism, heartbeat packets can be sent from […]

The driver has not received any packets from the server

Error encountered while testing data migration. Table of Contents 1. Error 2. Solve 3. Data migration test 3.1 Environment 3.2 Source code and testing 3.2.1 Source code 3.2.2 Test results (too slow) 3.2.3 Source code modification 3.2.4 Exceptions and solutions 1. Error The driver has not received any packets from the server. 2. Solution After […]

Guide to using golang flag package

Speaking of golang’s flag package, what is our first reaction? At least when I saw the flag package for the first time, my first reaction was to remember that when writing C language, we used it to define a representation. We usually named it the flag variable In fact, golang’s flag package is a tool […]

How are React component libraries packaged?

Everyone has used component libraries. Popular component libraries for react include Alibaba’s ant-design, Byte’s semi-design, arco-design, etc. So how are these component libraries packaged? If we write a component library ourselves, how to write packaging logic? Let’s explore it in this article. Create a new project: mkdir component-lib-test cd component-lib-test npm init -y Install ant-design, […]

Python modules and packages: use of sys module, os module and variable functions

Article directory module Import external modules Introduce some content package Sample code Ready out of the box sys module sys.argv sys.modules sys.path sys.platform sys.exit() os module os.environ os.system() Variables, functions and classes in the os module test code Use of variables and functions in modules Summarize: Recommended Python boutique columns Basic knowledge of python (0 […]

Apk decompilation and repackaging process

1. Decompile code 1. To decompile java code, you first need to download dex2jar, the download address: https://sourceforge.net/projects/dex2jar/files/ The latest version is 2.0, download and unzip it. 2. Rename the apk file to be decompiled to zip format and decompress it. Pay attention to the classes.dex file, which stores all the java code. Change classes. […]

vue cli packaging, production environment http-proxy-middleware proxy

structure tree Version 1. Create vue.config.js const path = require(‘path’); const UglifyJsPlugin = require(‘uglifyjs-webpack-plugin’) //compression const CompressionWebpackPlugin = require(‘compression-webpack-plugin’) const isProduction = process.env.NODE_ENV !== ‘development’; module.exports = { //Add the examples directory as a new page pages: { index: { //entry of page entry: process.env.NODE_ENV === ‘production’ ? ‘src/main-prod.js’ : ‘src/main.js’, // Template source template: […]