[STM32 uses the HAL library to implement DMA mode serial port to send and receive data, logic simulator, and baud rate calculation]

Write the directory title here 1. Introduction to DMA 1. DMA four transmission paths 2. Core parameters 3. DMA channel resources in STM32 4. DMA workflow (1) Kernel workflow without DMA (4) DMA transfer mode (5) Arbiter and priority (6) DMA interrupt Create CubeMX project main code Effect demonstration! [Insert picture description here](https://img-blog.csdnimg.cn/82410eb5a84b4e3a92f52a9d0fd6cc76.png) Logic simulator […]

Calculate the percentage of the tree structure, construct the tree, sort the ranking

package org.jeecg.modules.statistics.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import jodd.util.StringUtil; import org.jeecg.common.config.IotDBSessionConfig; import org.jeecg.common.utils.IotResultUtil; import org.jeecg.modules.alarm.service.IEmElectricityAlarmRecordService; import org.jeecg.modules.basic.entity.EmBasicRegion; import org.jeecg.modules.basic.service.IEmBasicRegionService; import org.jeecg.modules.basic.vo.EmBasicRegionVo; import org.jeecg.modules.device.entity.EmElecMeter; import org.jeecg.modules.device.service.IEmElecMeterService; import org.jeecg.modules.statistics.mapper.DeviceRankingMapper; import org.jeecg.modules.statistics.query.DeviceRankingQuery; import org.jeecg.modules.statistics.service.DeviceRankingService; import org.jeecg.modules.statistics.util.SankeyGraph; import org.jeecg.modules.statistics.util.SankeyGraphConverter; import org.jeecg.modules.statistics.vo.DeviceRankingVo; import org.jeecg.modules.statistics.vo.ModbusRegisterVo; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.text.DecimalFormat; import java.util.*; import java.util.stream.Collectors; @Service public class DeviceRankingServiceImpl extends ServiceImpl<DeviceRankingMapper, DeviceRankingQuery> […]

c Question 1: Read an integer number from the keyboard, calculate how many digits the number has, and print out the number in each digit.

Read an integer number from the keyboard, count how many digits the number has, and print out the number in each digit. Loop and remainder operator (pow) Because we need to use pow, we need to add #include to introduce the math library. Start writing code #include <stdio.h> int main() { int num, count = […]

Statistics | Python | Principal component analysis principal component score coefficient calculation

Foreword: Because spss cannot directly obtain the principal component score coefficient, refer to the articles written by other bloggers on csdn and sort out the code used to calculate the principal component score coefficient. Principle of principal component analysis Skip it first and add it later Principal component analysis code The libraries and file reading […]

If wages are calculated based on the amount of code, maybe it should be written like this!

Because the official account has changed the push rules, please click “Looking” and add “star” to get exciting technology sharing as soon as possible Click to follow the #InternetArchitect official account and get the full set of architect information here 0,2T architect learning materials dry content Previous article: Sharing of useful learning materials for 2T […]

Calcite custom optimizer rules

1) Summary 1. Create CSVProjectRule and inherit RelRule a) Implement matching rules in the CSVProjectRule.Config interface Config DEFAULT = EMPTY .withOperandSupplier(b0 ->b0.operand(LogicalProject.class).anyInputs()) .as(Config.class); b) In the CSVProjectRule implementation class, if the rule is matched, conversion will be performed @Override public void onMatch(RelOptRuleCall call) { final LogicalProject project = call.rel(0); final RelNode converted = convert(project); if […]

[Numerical calculation method] Gauss elimination method and its Python/C implementation

Article directory 1. Basic theory 1. System of linear equations 2. Detailed steps of Gauss elimination method 3. Precautions 2. Specific calculation process 1. Use Gauss elimination method to find the LU decomposition of A, and solve the system of equations Ax =b from this a. Perform LU decomposition of A. b. Use LU decomposition […]

Calcite Define RelNode Example via API

1) Summary Create RelNode through RelBuilder. 2) Code example MyRelBuilder import cn.com.ptpress.cdm.ds.csv.CsvSchema; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.plan.RelTraitDef; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.JoinRelType; import org.apache.calcite.schema.SchemaPlus; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.sql.parser.SqlParser; import org.apache.calcite.tools.FrameworkConfig; import org.apache.calcite.tools.Frameworks; import org.apache.calcite.tools.RelBuilder; import org.junit.jupiter.api.Test; import java.util.List; class MyRelBuilder { /** * LogicalJoin(condition=[=($2, $8)], joinType=[inner]) * LogicalJoin(condition=[=($0, $3)], joinType=[inner]) * LogicalTableScan(table=[[csv, data]]) * LogicalTableScan(table=[[csv, data]]) * […]

Parameter calculation method of CNN convolutional neural network model (empirical version)

If you review the past and learn the new, you can become a teacher! 1. Reference materials How to use torchsummary and torchstat and analyze the results 2. Related introduction 1. Parameter amount and calculation amount Reference blog: Easy to understand the parameters and calculation amount of the CNN convolutional neural network model 3. Common […]