[python] Django–templates, static files, django template syntax, requests and responses

The notes are study notes compiled by myself. If there are any mistakes, please point them out~ [Django column] Django–Introduction to Django, installation of Django, creating projects, and getting started quickly Django – templates, static files, django template syntax, requests and responses Django – connect to mysql database Django–templates, static files, django template syntax, requests […]

[PG] Configuration file for PostgreSQL high availability solution repmgr management

1 Configuration File 1.1 Configuration file format repmgr.conf is a plain text file containing one parameter/value combination per line. White spaces are irrelevant (except within quoted parameter values), and blank lines are ignored. #Specifies the remainder of the line as a comment. Parameter values that are not simple identifiers or numbers should be enclosed in […]

Python generates a pair of RSA keys and saves the public and private keys as .pem files respectively. Use the public key in the generated RSA key pair to encrypt the data, and then use the private key to decrypt. Convert RSA’s public key exponent (E) and modulus (N) to .pem format

You can use the cryptography library to generate a pair of RSA keys and save the public and private keys as .pem files respectively. Here is a sample code: from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa # Generate RSA key pair private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048, backend=default_backend() ) # Get […]

Unity data reading | (4) Json file parsing (Newtonsoft.Json, Litjson, JsonUtility, SimpleJSON)

Directory 1 Introduction 2. Advantages and Disadvantages 3. Analysis 3.1 Newtonsoft.Json 3.1.1 Download address 3.1.2 Advantages and Disadvantages 3.1.3 Analysis 3.2 listjson 3.2.1 Download address 3.2.2 Advantages and Disadvantages 3.2.3 Analysis 3.3 JsonUtility 3.3.1 Advantages and Disadvantages 3.3.2 Analysis 3.4 SimpleJSON 3.4.1 Download address 3.4.2 Advantages and Disadvantages 3.4.3 Analysis 4. Summary 1. Preface A […]

Solution to “Python3.12pip network installation library file error, ssl module is unavailable”

Solution to “Python3.12pip network installation library file error, ssl module is unavailable” 1. Install the new version of openssl3.1.4 2. Install Python3.12.0 The Python version needs to match the openssl version. In versions after Python 3.7, the dependent openssl must be a version after 1.1.1 or 1.0.2, and the openssl1.0.2k installed in CentOS7 cannot meet […]

One Demo handles the front-end and back-end multi-part uploading of large files, resumed uploading at breakpoints, and instantaneous uploading.

1Foreword File uploading is very common in project development. Most projects will involve the uploading of pictures, audios, videos, and files. Usually a simple Form can upload small files, but when encountering large files, such as more than 1GB, or When the user’s network is relatively slow, simple file upload is not applicable. The user […]

When installing Bitcoin in Ubuntu, a make compilation error occurs or there is no such file when running ./configure –with-incompatible-bdb.

If you install Bitcoin by installing dependencies and get a make compilation error or run ./configure –with-incompatible-bdb and it shows that there is no such file, you can try my method. Reference: http://t.csdnimg.cn/bMdRc If you install this document, you will not be able to verify the path of the Bitcoin file, so you need to […]

VSCode runs c++ program (operation + detailed explanation + json file configuration detailed explanation)

Preface: Because the quality of online tutorials varies, I felt very confused when I first came into contact with this thing. I hereby write this blog to help my friends solve the problem. Table of Contents 1. Operation details 1Download VSCode code editor 2Install C/C++ extension 3Install the MinGW-w64 compiler 4Add path 5 Test whether […]