Table of Contents background Practical create table insert data Notice: Summarize Background The current requirement is to create a table in the database according to the text file of the class to obtain information such as type and attribute name. Practice Create table General idea: Obtain information such as attribute names and types in the […]
Tag: insert
Generate a QR code with text at the bottom of the image inserted in the center
package com.scamel.mom.common.util; import cn.hutool.core.io.resource.ClassPathResource; import com.alibaba.nacos.common.utils.StringUtils; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.MultiFormatWriter; import com.google.zxing.WriterException; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import sun.font.FontDesignMetrics; import javax.imageio.ImageIO; import java.awt.*; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.geom.AffineTransform; import java.awt.geom.RoundRectangle2D; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * QR code, barcode generation tool */ public class CodeUtils […]
The choice between forEach and Batch for MyBatis batch insertion
The choice of forEach and Batch for MyBatis batch insertion When using the MyBatis framework, let you write a batch insert, will you only use the forEach tag loop in the mapper.xml file? Do you know the problems with using the forEach tag? 1. Prerequisite configuration 1.1, create a data table Create a data table […]
Mybatis Plus batch insert performance optimization, very practical!
Click on the “Java base” above, select “Set as star” Be a positive person, not a positive waste person! Update articles every day at 14:00, lose a million bits of hair every day… Source code boutique column Original | Java 2021 Super God Road, very liver~ An open source project with detailed annotations in Chinese […]
kprobe inserts a pile at a function offset
For symbols, it is easy to find, just look up the kernel symbol table, but if you want to know the offset of a statement in a function relative to the starting address of the function, you still need a certain method. Requirement: How to get the corresponding offset if you want to insert the […]
Word file insert signature or seal picture (original code)
/* * Test report signature * Signature call method * * fileid file id * userid user id * typeid placeholder * gid primary key * code file server encoding * */ @RequestMapping(“insertimages”) public <string> String insertimages(String Fileid, String Userid, String Typeid, String gid, String code) throws Exception { FileInfo fileinfo = (FileInfo) baseDao. get(Fileid, […]
How to insert hundreds of thousands of data in Java (it only takes 13 seconds to insert 300,000 data into MySQL)
This article mainly describes the cases and results of large data volume data insertion through MyBatis, JDBC, etc. 300,000 pieces of data are inserted into the database for verification Entity class, mapper and configuration file definition User entity mapper interface mapper.xml file jdbc.properties sqlMapConfig.xml Stud directly regardless of batches Insert one by one in a […]
100 million pieces of data are inserted into MySQL in batches, which method is the fastest?
Using JAVA to insert 100 million data into Mysql – efficiency evaluation When researching the query efficiency in mysql optimization in the past few days, I found that the test data is too small (100,000 levels). Using EXPLAIN to compare different SQL statements, I can’t get more effective evaluation data, most of them are ambiguous, […]
Insertion sort – direct insertion sort and Hill sort
Direct insertion sort The idea of direct insertion sorting is: Insert the records to be sorted into an ordered sequence that has been sorted one by one according to the size of their key code values, until all the records are inserted. , get a new ordered sequence . We can first look at the […]
Insert operation of balanced binary tree (AVL tree)
1. Chain storage of AVL tree typedef int ElementType; typedef struct AVLNode *Position; typedef Position AVLTree; struct AVLNode{ ElementType Data;//node data AVLTree Left;//Point to the left subtree AVLTree Right;//point to the right subtree int Height;//tree height }; 2. Rotate left monorotation AVLTree SingleLeftRotation(AVLTree A) { //A must have a left child node B //return the […]