【STM32G431RBTx】备战蓝桥杯嵌入式→省赛试题→第十四届

文章目录

    • 前言
    • 一、题目
    • 二、模块初始化
    • 三、代码实现
      • interrupt.h:
      • interrupt.c:
      • main.h:
      • main.c:
    • 四、完成效果
    • 五、总结

前言

一、题目

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

二、模块初始化

1.LCD这里不用配置,直接使用提供的资源包就行
2.KEY, 四个按键IO口都要配置,分别是PB0, PB1,PB2,PA0依次是B0,B1,B2,B3不要弄错了
3.LED:开启PC8,PC9,PD2输出模式就行了。
4.定时器:TIM3(按键消抖定时器):PSC:80-1,ARR:10000-1,TIM2CH2(PA1PWM占空比以及频率):PSC:100-1,ARR:200-1,TIM4(低高频转换时间控制,LED闪烁控制,统计数据时间控制):PSC:80-1,ARR:9999,TIM17输入捕获采集。

三、代码实现

bsp组中共有:
在这里插入图片描述

interrupt.h:

#ifndef __INTERRUPT_H__
#define __INTERRUPT_H__#include "main.h"
#include "stdbool.h"struct keys
{bool key_sta;unsigned char judge_sta;unsigned int key_time;bool single_flag;bool long_flag;
};#endif

interrupt.c:

#include "interrupt.h"
#include "tim.h"struct keys key[4] = {0, 0, 0, 0, 0};extern unsigned char PA1changingFlag;
extern unsigned int PA1changingTick;
extern unsigned int PA1Fre;
extern unsigned char PA1OutputMode;
extern unsigned int N;
extern float V;
float VHregister = 0.0;
unsigned int VHcompareTick = 0;
float VLregister = 0.0;
unsigned int VLcompareTick = 0;
extern float MH;
extern float ML;
extern unsigned char LED;void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef * htim)
{if(htim->Instance == TIM3){key[0].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_0);key[1].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_1);key[2].key_sta = HAL_GPIO_ReadPin(GPIOB, GPIO_PIN_2);key[3].key_sta = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_0);for(unsigned char i = 0; i < 4; i++){switch(key[i].judge_sta){case 0:{if(key[i].key_sta == 0){key[i].judge_sta = 1;key[i].key_time = 0;}break;}case 1:{if(key[i].key_sta == 0){key[i].judge_sta = 2;}else{key[i].judge_sta = 0;}break;}case 2:{if(key[i].key_sta == 1){key[i].judge_sta = 0;if(key[i].key_time <= 200){key[i].single_flag = 1;}else if(key[i].key_time > 200){key[i].long_flag = 1;}}else{key[i].key_time++;}break;}}}}if(htim->Instance ==TIM4){if(PA1changingFlag == 1){if(PA1OutputMode == LOWFRE){PA1changingTick++;if(PA1changingTick % 10 == 0)LED ^= 0x02;PA1Fre += 8;__HAL_TIM_SET_PRESCALER(&htim2, (80000000 / 200 / PA1Fre) - 1);if(PA1changingTick >= 500){PA1changingTick = 0;PA1changingFlag = 0;PA1OutputMode = HIGHFRE;LED &= ~(0x02);N++;}}else if(PA1OutputMode == HIGHFRE){PA1changingTick++;if(PA1changingTick % 10 == 0)LED ^= 0x02;PA1Fre -= 8;__HAL_TIM_SET_PRESCALER(&htim2, (80000000 / 200 / PA1Fre) - 1);if(PA1changingTick >= 500){PA1changingTick = 0;PA1changingFlag = 0;PA1OutputMode = LOWFRE;LED &= ~(0x02);N++;}}}if(PA1OutputMode == HIGHFRE){if(VHcompareTick >= 200){if((unsigned int)(VHregister * 10) == (unsigned int)(V * 10)){MH = VHregister;VHcompareTick = 0;}}else{VHcompareTick++;if((unsigned int)(VHregister * 10) != (unsigned int)(V * 10)){VHcompareTick = 0;}}VHregister = V;}else if(PA1OutputMode == LOWFRE){if(VLcompareTick >= 200){if((unsigned int)(VLregister * 10) == (unsigned int)(V * 10)){ML = VLregister;VLcompareTick = 0;}}else{VLcompareTick++;if((unsigned int)(VLregister * 10) != (unsigned int)(V * 10)){VLcompareTick = 0;}}VLregister = V;}}
}/* Captured Values */
uint32_t uwIC1Value1_T17CH1 = 0;
uint32_t uwIC1Value2_T17CH1 = 0;
uint32_t uwHighCapture_T17CH1 = 0;
uint32_t uwLowCapture_T17CH1 = 0;/* Capture index */
uint16_t uhCaptureIndex_T17CH1 = 0;/* Frequency Value */
uint32_t uwFrequency_T17CH1 = 0;
float uwDuty_T17CH1 = 0;void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1){if(uhCaptureIndex_T17CH1 == 0){/* Get the 1st Input Capture value */uwIC1Value1_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1);__HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_FALLING);uhCaptureIndex_T17CH1 = 1;}else if(uhCaptureIndex_T17CH1 == 1){/* Get the 2nd Input Capture value */uwIC1Value2_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); __HAL_TIM_SET_CAPTUREPOLARITY(htim, TIM_CHANNEL_1, TIM_INPUTCHANNELPOLARITY_RISING);/* Capture computation */if (uwIC1Value2_T17CH1 > uwIC1Value1_T17CH1){uwHighCapture_T17CH1 = (uwIC1Value2_T17CH1 - uwIC1Value1_T17CH1); }else if (uwIC1Value2_T17CH1 < uwIC1Value1_T17CH1){/* 0xFFFF is max TIM1_CCRx value */uwHighCapture_T17CH1 = ((0xFFFF - uwIC1Value1_T17CH1) + uwIC1Value2_T17CH1) + 1;}else{/* If capture values are equal, we have reached the limit of frequencymeasures */Error_Handler();}uhCaptureIndex_T17CH1 = 2;uwIC1Value1_T17CH1 = uwIC1Value2_T17CH1;/* Frequency computation: for this example TIMx (TIM1) is clocked byAPB2Clk */      
//      uwFrequency_T17CH1 = 1000000 / uwDiffCapture_T17CH1;
//      uhCaptureIndex_T17CH1 = 0;}else if(uhCaptureIndex_T17CH1 == 2){uwIC1Value2_T17CH1 = HAL_TIM_ReadCapturedValue(htim, TIM_CHANNEL_1); /* Capture computation */if (uwIC1Value2_T17CH1 > uwIC1Value1_T17CH1){uwLowCapture_T17CH1 = (uwIC1Value2_T17CH1 - uwIC1Value1_T17CH1); }else if (uwIC1Value2_T17CH1 < uwIC1Value1_T17CH1){/* 0xFFFF is max TIM1_CCRx value */uwLowCapture_T17CH1 = ((0xFFFF - uwIC1Value1_T17CH1) + uwIC1Value2_T17CH1) + 1;}else{/* If capture values are equal, we have reached the limit of frequencymeasures */Error_Handler();}uwFrequency_T17CH1 = 1000000 / (uwHighCapture_T17CH1 + uwLowCapture_T17CH1);uwDuty_T17CH1 = uwHighCapture_T17CH1 * 100.0 / (uwLowCapture_T17CH1 + uwHighCapture_T17CH1);uhCaptureIndex_T17CH1 = 0;}}
}

main.h:

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : main.h* @brief          : Header for main.c file.*                   This file contains the common defines of the application.******************************************************************************* @attention** Copyright (c) 2024 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header *//* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H#ifdef __cplusplus
extern "C" {
#endif/* Includes ------------------------------------------------------------------*/
#include "stm32g4xx_hal.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes *//* USER CODE END Includes *//* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET *//* USER CODE END ET *//* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC *//* USER CODE END EC *//* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM *//* USER CODE END EM *//* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);/* USER CODE BEGIN EFP *//* USER CODE END EFP *//* Private defines -----------------------------------------------------------*//* USER CODE BEGIN Private defines */
#define KA ((85.0 - 10.0)/(3.0 - 1.0)) 
#define DATA 0
#define PARA 1
#define RECD 2
#define LOWFRE 0
#define HIGHFRE 1
/* USER CODE END Private defines */#ifdef __cplusplus
}
#endif#endif /* __MAIN_H */

main.c:

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : main.c* @brief          : Main program body******************************************************************************* @attention** Copyright (c) 2024 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "adc.h"
#include "tim.h"
#include "gpio.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "lcd.h"
#include "interrupt.h"
#include "stdio.h"
#include "badc.h"
#include "led.h"
/* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD *//* USER CODE END PTD *//* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM *//* USER CODE END PM *//* Private variables ---------------------------------------------------------*//* USER CODE BEGIN PV */
extern uint32_t uwFrequency_T17CH1;
extern float uwDuty_T17CH1;
char text[30];
extern struct keys key[4];
float R37Volt;
float PA1Duty;//(0.0%, 100.0%)
unsigned int PA1Fre = 4000; //8hz / 10ms
unsigned char PA1changingFlag;
unsigned int PA1changingTick;
unsigned char PA1OutputMode;
unsigned char DisplayMode;
unsigned int R = 1;
unsigned int K = 1;
unsigned int Rtemp = 1, Ktemp = 1;
unsigned int N = 0;
float V = 0;
float MH;
float ML;
unsigned char SettingRKIndex;
unsigned char PA1DutyLock;
unsigned char LED;
/* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP */
void LCD_Disp(void);
void DisposeKey(void);
float DutyReturn(float R37Volt);
/* USER CODE END PFP *//* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 *//* USER CODE END 0 *//*** @brief  The application entry point.* @retval int*/
int main(void)
{/* USER CODE BEGIN 1 *//* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init *//* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_ADC2_Init();MX_TIM2_Init();MX_TIM17_Init();MX_TIM3_Init();MX_TIM4_Init();/* USER CODE BEGIN 2 */LCD_Init();LCD_Clear(Black);LCD_SetBackColor(Black);LCD_SetTextColor(White);HAL_TIM_IC_Start_IT(&htim17, TIM_CHANNEL_1);HAL_TIM_Base_Start_IT(&htim3);HAL_TIM_Base_Start_IT(&htim4);getADC(&hadc2);R37Volt = getADC(&hadc2) * 3.3 / 4096;PA1Duty = DutyReturn(R37Volt);__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_2, (unsigned int)(PA1Duty * 2));HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);LED_Disp(0x00);/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */R37Volt = getADC(&hadc2) * 3.3 / 4096;PA1Duty = DutyReturn(R37Volt);V = uwFrequency_T17CH1 * 2 * 3.14 * R / (100.0 * K);if(PA1DutyLock == 0){__HAL_TIM_SET_COMPARE(&htim2, TIM_CHANNEL_2, (unsigned int)(PA1Duty * 2));}DisposeKey();if(DisplayMode == DATA){LED |= 0x01;}else{LED &= ~0x01;}if(PA1DutyLock == 1){LED |= (0x01 << 2);}else{LED &= ~(0x01 << 2);}LED_Disp(LED);LCD_Disp();}/* USER CODE END 3 */
}/*** @brief System Clock Configuration* @retval None*/
void SystemClock_Config(void)
{RCC_OscInitTypeDef RCC_OscInitStruct = {0};RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};/** Configure the main internal regulator output voltage*/HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);/** Initializes the RCC Oscillators according to the specified parameters* in the RCC_OscInitTypeDef structure.*/RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;RCC_OscInitStruct.HSEState = RCC_HSE_ON;RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV3;RCC_OscInitStruct.PLL.PLLN = 20;RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK){Error_Handler();}/** Initializes the CPU, AHB and APB buses clocks*/RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK){Error_Handler();}
}/* USER CODE BEGIN 4 */
void DisposeKey(void)
{if(key[0].single_flag){DisplayMode++;if(DisplayMode == RECD){R = Rtemp;K = Ktemp;}else if(DisplayMode == PARA){SettingRKIndex = 0;}DisplayMode %= 3;LCD_Clear(Black);key[0].single_flag = 0;}if(key[1].single_flag){if(DisplayMode == DATA){if(PA1changingFlag == 0){PA1changingFlag = 1;PA1changingTick = 0;}}else if(DisplayMode == PARA){SettingRKIndex = !SettingRKIndex;}key[1].single_flag = 0;}if(key[2].single_flag){if(DisplayMode == PARA){if(SettingRKIndex == 0){Rtemp++;if(Rtemp == 11)Rtemp = 1;}else if(SettingRKIndex == 1){Ktemp++;if(Ktemp == 11)Ktemp = 1;}}key[2].single_flag = 0;}if(key[3].single_flag){if(DisplayMode == PARA){if(SettingRKIndex == 0){Rtemp--;if(Rtemp == 0)Rtemp = 10;}else if(SettingRKIndex == 1){Ktemp--;if(Ktemp == 0)Ktemp = 10;}}else if(DisplayMode == DATA){if(PA1DutyLock){PA1DutyLock = 0;}}key[3].single_flag = 0;}if(key[3].long_flag){if(DisplayMode == DATA){PA1DutyLock = 1;}key[3].long_flag = 0;}
}void LCD_Disp(void)
{if(DisplayMode == DATA){LCD_DisplayStringLine(Line1, "        DATA");if(PA1OutputMode == HIGHFRE){LCD_DisplayStringLine(Line3, "     M=H");}else if(PA1OutputMode == LOWFRE){LCD_DisplayStringLine(Line3, "     M=L");}sprintf(text, "     P=%02d%%", (unsigned char)(uwDuty_T17CH1 + 0.5)); //ËÄÉáÎåÈë LCD_DisplayStringLine(Line4, text);sprintf(text, "     V=%.1f    ", V);LCD_DisplayStringLine(Line5, text);}else if(DisplayMode == PARA){LCD_DisplayStringLine(Line1, "        PARA");sprintf(text, "     R=%d  ", Rtemp);LCD_DisplayStringLine(Line3, text);sprintf(text, "     K=%d  ", Ktemp);LCD_DisplayStringLine(Line4, text);}else if(DisplayMode == RECD){LCD_DisplayStringLine(Line1, "        RECD");sprintf(text, "     N=%d   ", N);LCD_DisplayStringLine(Line3, text);sprintf(text, "     MH=%.1f    ", MH);LCD_DisplayStringLine(Line4, text);sprintf(text, "     ML=%.1f    ", ML);LCD_DisplayStringLine(Line5, text);}
}float DutyReturn(float R37Volt)
{float Duty = 0;if(R37Volt < 1.0){Duty = 10.0;}else if(R37Volt >= 1.0 && R37Volt < 3.0){Duty = KA * (R37Volt - 1) + 10.0;}else if(R37Volt >= 3.0){Duty = 85.0;}return Duty;
}
/* USER CODE END 4 *//*** @brief  This function is executed in case of error occurrence.* @retval None*/
void Error_Handler(void)
{/* USER CODE BEGIN Error_Handler_Debug *//* User can add his own implementation to report the HAL error return state */__disable_irq();while (1){}/* USER CODE END Error_Handler_Debug */
}#ifdef  USE_FULL_ASSERT
/*** @brief  Reports the name of the source file and the source line number*         where the assert_param error has occurred.* @param  file: pointer to the source file name* @param  line: assert_param error line source number* @retval None*/
void assert_failed(uint8_t *file, uint32_t line)
{/* USER CODE BEGIN 6 *//* User can add his own implementation to report the file name and line number,ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) *//* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

四、完成效果

蓝桥杯嵌入式第十四届省赛试题实现效果

五、总结

其实说本篇文章只是为了存放我的代码,所以看不懂很正常。
十四届省赛代码

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/305446.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

albef论文学习

首先要知道vit是啥东西。vit就是transformer模型在图像领域的运用。 transformer模型原本是用于自然语言的&#xff0c;encoder和decoder接受的都是文字。vit把图像分割成很多个小块&#xff0c;把各个小块拉长当成向量来用&#xff0c;接下来就是一样的。最后接一个全连接层做…

Qt | Qt 的重要文件简介(推荐)

一、项目文件(pro 文件)及其语法 1、项目文件(pro 文件)的作用是列举项目中的源文件, 2、pro 文件的语法形式为:“变量 操作符 值”,比如 QT += widgets,多个值之间使用空格分开。 3、pro 文件的注释:从“#”开始,直至本行结束。 4、pro 文件的操作符见下表 5、pro 文…

RAG应用开发实战(01)-RAG应用框架和解析器

1 开源解析和拆分文档 第三方的工具去对文件解析拆分&#xff0c;去将我们的文件内容给提取出来&#xff0c;并将我们的文档内容去拆分成一个小的chunk。常见的PDF word mark down, JSON、HTML。都可以有很好的一些模块去把这些文件去进行一个东西去提取。 优势 支持丰富的文…

Spring Boot 框架集成Knife4j

本次示例使用 Spring Boot 作为脚手架来快速集成 Knife4j,Spring Boot 版本2.3.5.RELEASE,Knife4j 版本2.0.7&#xff0c;完整代码可以去参考 knife4j-spring-boot-fast-demo pom.xml 完整文件代码如下 <?xml version"1.0" encoding"UTF-8"?> &l…

Meta宣布全新训推一体加速器:完全集成PyTorch 2,性能3倍提升

ChatGPT狂飙160天&#xff0c;世界已经不是之前的样子。 新建了免费的人工智能中文站https://ai.weoknow.com 新建了收费的人工智能中文站https://ai.hzytsoft.cn/ 更多资源欢迎关注 Meta 疯狂砸入数十亿美元&#xff0c;一部分招揽人才&#xff0c;一部分造芯片。 Meta 正在不…

HCIE考试第三题:业务容器化及割接

文章目录 业务容器化及割接题目和做题步骤如下3.1业务容器化及割接3.1创建CCE集群solo3.2创建NAT网关3.2.1申请EIP3.2.2创建NAT网关3.2.3添加SNAT规则3.3创建节点池3.3.1 创建namespace3.3.2创建节点池3.4 安装命令行工具kubectl3.4.1上传kubectl3.4.2上传kubeconfig配置文件3.…

批归一化(BN)在神经网络中的作用与原理

文章目录 1. 批归一化&#xff08;BN&#xff09;在神经网络中的作用与原理1.1 作用与优势1.2 原理与推导 2. 将BN应用于神经网络的方法2.1 训练时的BN 2. 将BN应用于神经网络的方法2.1 训练时的BN2.2 测试时的BN代码示例&#xff08;Python&#xff09;&#xff1a; 3. BN的优…

做微信商城需要注意的几点问题

在社交平台做电商&#xff0c;已经非常常见&#xff0c;其中&#xff0c;最受欢迎的莫过于微信商城&#xff0c;基于微信公众号开发&#xff0c;进行宣传及变现&#xff0c;与用户建立长期双向联系&#xff0c;让用户形成长期稳定的购物习惯。看起来&#xff0c;这是一个很不错…

C++算法 —— 位运算

一、基本的位运算操作 1.基础位运算操作符 << : 二进制位整体左移 >> : 二进制位整体右移 ~ : 按位取反 & &#xff1a; 按位与 | &#xff1a; 按位或 ^ : 按位异或 &#xff08;无进位相加&#xff09; 2.给一个数n&#xff0c;确定它的二进制表示中第…

基于昇思的大地电磁智能反演模型达到业界SOTA,助力地球物理勘探加速智能化

近日&#xff0c;华为AI4S Lab与清华大学李懋坤教授团队、华为先进计算与存储实验室合作&#xff0c;基于昇腾AI处理器与昇思MindSpore AI框架打造了大地电磁智能反演模型。该模型通过变分自编码器&#xff08;VAE&#xff09;灵活嵌入了多物理先验知识&#xff0c;达到了业界S…

三次 Bspline(B样条曲线) NURBS曲线的绘制 matlab

先来了解几个概念&#xff1a; 1.1 节点向量&#xff1a; B-Spline需要定义曲线的节点向量U&#xff0c;它可以对应到Bezier曲线的参数u。 其元素个数 (m1) 和曲线阶数 k 、控制点个数n满足&#xff1a;m1k1n1 如果U的每段的距离是相等&#xff0c;那么这个B-Spline就被称为均…

多级菜单Mysql数据库表设计与创建

1.还是以Vue实现学院官网为例 文章地址&#xff1a;http://t.csdnimg.cn/jrJhE Vue 实现学院官网“菜单”当时是使用静态数据&#xff0c;也就是在页面上写死了的。 今天我们需要将“菜单”数据在数据库中进行维护&#xff0c;我们使用的是Mysql数据库 2.数据库的设计 我们的…

文心一言 VS 讯飞星火 VS chatgpt (234)-- 算法导论17.2 2题

二、用核算法重做练习17.1-3。练习17.1-3的内容是&#xff1a;假定我们对一个数据结构执行一个由 n 个操作组成的操作序列&#xff0c;当 i 严格为 2 的幂时第 i 个操作的代价为 i &#xff0c;否则代价为1。使用聚合分析确定每个操作的摊还代价。 文心一言&#xff1a; 练习…

Vue的学习之旅-part4

Vue的学习之旅-part1 vue的自带指令v-if v-else-if v-else虚拟DOM的复用v-show 与 v-if 的不同之处&#xff1a;v-if v-show各自合适的使用位置&#xff1a; v-for 循环v-for 循环遍历 :key"item" 绑定key&#xff0c;区分循环的内容循环的应用&#xff1a; 前几篇博…

基于SpringBoot+Vue的公园管理系统(源码+文档+部署+讲解)

一.系统概述 近年来&#xff0c;科技飞速发展&#xff0c;在经济全球化的背景之下&#xff0c;互联网技术将进一步提高社会综合发展的效率和速度&#xff0c;互联网技术也会涉及到各个领域&#xff0c;而公园管理系统在网络背景下有着无法忽视的作用。信息管理系统的开发是一个…

React + three.js 3D模型骨骼绑定

系列文章目录 React 使用 three.js 加载 gltf 3D模型 | three.js 入门React three.js 3D模型骨骼绑定React three.js 3D模型面部表情控制 项目代码(github)&#xff1a;https://github.com/couchette/simple-react-three-skeleton-demo 项目代码(gitcode)&#xff1a;https:…

保姆级Xshell安装教程

简介 Xshell 是一个强大的安全终端模拟软件&#xff0c;它支持SSH1, SSH2, 以及Microsoft Windows 平台的TELNET 协议。Xshell 通过互联网到远程主机的安全连接以及它创新性的设计和特色帮助用户在复杂的网络环境中享受他们的工作。 Xshell可以在Windows界面下用来访问远端不…

Windows:Redis数据库图形化中文工具软件——RESP(3)

这个是用于连接redis数据库的软件工具&#xff0c;安装在windows上的图形化界面&#xff0c;并且支持中文&#xff0c;是在github上的一个项目 1.获取安装包 发布 lework/RedisDesktopManager-Windows (github.com)https://github.com/lework/RedisDesktopManager-Windows/rel…

vulhub之fastjson篇-1.2.27-rce

一、启动环境 虚拟机:kali靶机:192.168.125.130/172.19.0.1(docker地址:172.19.0.2) 虚拟机:kali攻击机:192.168.125.130/172.19.0.1 本地MAC:172.XX.XX.XX 启动 fastjson 反序列化导致任意命令执行漏洞 环境 1.进入 vulhub 的 Fastjson 1.2.47 路径 cd /../../vulhub/fa…

Vue中如何使用Tailwind CSS样式?多次引用不成功?具体步骤怎么做?

一、安装Tailwind CSS和依赖 在你的Vue项目中安装Tailwind CSS及其依赖。你可以使用npm或yarn来安装。 npm install tailwindcsslatest postcsslatest autoprefixerlatest # 或者yarn add tailwindcsslatest postcsslatest autoprefixerlatest 二、初始化Tailwind CSS np…