[Java tool class] Generate random image verification code and convert it to Base64 code

Article Directory Table of Contents Article Table of Contents Text 1. Directly upload the code 2. Things to note 3. Test 4. Get Base64 code Text 1. Directly upload the code package com.review.demo.util; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Base64; import java.util.Random; public class ImageCodeCreate { /** * long */ […]

Parse html to generate Word document

Content: Read the text content in the html file, and then generate a Word document for export. Case scenario: After the requirement development is completed, a document (code modification list) needs to be written. The content of the document is all the codes modified/added this time. The modified file paths and code snippets need to […]

Android uses poi to generate Excel and word and save them in the specified path

As soon as you add dependencies (be sure to use new versions of dependencies to prevent some bugs) minSdk= 26 //Note that the minimum supported SDK26 dependencies {<!– –> implementation ‘org.apache.poi:poi:5.2.4’ implementation ‘org.apache.poi:poi-ooxml:5.2.4’ implementation ‘javax.xml.stream:stax-api:1.0-2’ } Second, creation method private void createExcelFile(String Path) {<!– –> //Create workbook Workbook workbook = new XSSFWorkbook(); //Create worksheet Sheet […]

ProtoBuf compiles and generates Google.Protobuf.dll and Protoc.exe, and customizes the code generation rules

Article directory ProtoBuf basic introduction Import ProtoBuf locally Compile and get Google.Protobuf.dll Compile to get the Protoc.exe executable file CMake compiles ProtoBuf into Visual Studio basic configuration Resolve errors after Finish Error 1 and solution: googletest Error 2 and solution: abseil-cpp Visual Studio generates basic exe operations Use Protoc.exe to compile Proto files into C# […]

Linux generates dynamic libraries

Dynamic library 1. Naming rules Linux: libxxx.so lib: prefix (fixed); xxx: The name of the dynamic library (choose it yourself); .so: suffix (fixed); Windows:libxxx.dll 2. Production of dynamic library Use gcc to get the .o file and get position-independent code: gcc -c -fpic a.c b.c … Use gcc to get the dynamic library: gcc -shared […]

MATLAB generates dll library and calls and parameter settings in Qt

Navigation Matlab generates dll and calls it in Qt Matlab generates dll Qt calls the generated dll dll library input and output parameters My experience when using it Reference link Matlab generates dll and calls it in Qt Manually converting Matlab algorithms into C++ is time-consuming and laborious, and the C/C++ code generated by matlab […]

Use IDEA plug-in to generate YaPi interface documents + Windows environment to build YaPi service

Use IDEA plug-in to generate YaPi interface documents + build YaPi service in Windows environment [Note 1: Before using the idea plug-in to generate yapi documents, you need to set up a yapi service] [Note 2: This article is about setting up the Yapi service on Windows] [Note 3: It is best to keep the […]

canvas uses front-end technology to generate image similarity hash (crop the image as long as the surrounding blank area is removed from the image content)

We made such a requirement in the front-end time. The designer designed the theme template through Photoshop software, and then we parsed the layer information in the psd file through the program, such as decorative pictures, text boxes, picture boxes, background pictures, etc. (this may be Some layer tags will be involved). For information on […]

Inherit the Jwt token verification interceptor and generate interface documents through knife4j

sky: jwt: #Set the secret key used when encrypting jwt signatures admin-secret-key: itcast # Set jwt expiration time to 2 hours admin-ttl: 7200000 #Set the token name passed by the front end admin-token-name: token Get configuration class related attributes package com.sky.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; @Component @ConfigurationProperties(prefix = “sky.jwt”) @Data public class JwtProperties […]