Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0

Table of Contents Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0) error wrong reason solution Precaution Application scenarios Causes and precautions for file truncation or damage reason: Precautions: Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0) error […]

LightDB (13.8-23.3) supports ALTER TABLE name TRUNCATE PARTITION partition_name update indexes syntax

Common range partition table create table test_part_update_indexes_range(id int primary key) PARTITION by range(id)( partition p1 VALUES LESS THAN (202000) nocompress, partition p2 VALUES LESS THAN (202001) compress, partition p3 VALUES LESS THAN (202002) ); ALTER TABLE test_part_update_indexes_range TRUNCATE PARTITION p1; drop table test_part_update_indexes_range; create table test_part_update_indexes_range(id int primary key) PARTITION by range(id)( partition p1 VALUES […]

[mysql table partition system] use DROP PARTITION syntax and TRUNCATE PARTITION carefully for mysql table partition

First of all, let me declare that the mysql version I use here is version 5.7.29. Of course, the following questions are also based on this version. Because there is no research on whether other versions will have these problems, you can check the information in the official documents Why do you say that you […]

[Opencv] PIL Opencv writes text to the picture and rotates the text, Opencv picture rotation does not truncate, Opencv picture rotation does not crop

Article directory distortion Implementation of Pillow Implementation of Opencv Rotate image without cropping Rotate text and map C++ picture perspective transformation Distortion Rigid transformation: Only the position (translation transformation) and orientation (rotation transformation) of the object change, but the shape remains unchanged. The obtained transformation is called rigid transformation. Rigid transformations are the most general […]

Why exactly is the TRUNCATE statement slow?

The author analyzes the reasons and solutions for the slow SQL formed by the truncate statement through the source code, and compares it with MySQL 5.7 on the relevant implementation logic. Problem phenomenon Received feedback that when a test environment executes batch operations, there are truncate statements in the slow query log. I am worried […]

Why exactly is the TRUNCATE statement slow?

Directory problem phenomenon key configuration Problem Analysis Summary Q1: How is the TRUNCATE statement executed? The fd handle doesn’t change? Why is the execution time long? How is the TRUNCATE statement executed? Why doesn’t the handle change? Q2: How to analyze the problem of slow TRUNCATE? Method 1: Slow log? Method 2: Execute the plan? […]

python wannier90 Select truncated hopping based on wannier90’s *_hr.dat file to draw energy band diagram

We know that wannier90 can generate a detailed hopping energy *_hr.dat file based on the orbital information of the selected TMDs. It is relatively simple to select all the hopping and draw them, but we found that the band can also be expressed by taking a few rounds of approximate hopping, similar Ideas include Pybinding’s […]