蓝桥杯物联网竞赛_STM32L071KBU6_第十五届蓝桥杯物联网竞赛国赛代码解析

目录

  • 前言:
  • 1、配置及代码:
    • (1) A板:
      • [1] CUBMX配置:
      • [2] keil5代码:
    • (2) B板:
      • [1] CUBMX配置:
      • [2] keil5代码:
  • 2、代码解析:

前言:

这届国赛是目前为止最难一届,我赛后完完整整又做了一遍,花了我两天大概12小时,这个难度完全可以当一个stm32的期末设计,下面将对本届的题结合对应代码做重点解析

对应试题在这里: 第十五届蓝桥杯物联网试题(国赛)

1、配置及代码:

(1) A板:

[1] CUBMX配置:

[2] keil5代码:

main.c:

#include "main.h"
#include "dma.h"
#include "i2c.h"
#include "spi.h"
#include "tim.h"
#include "usart.h"
#include "gpio.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes *//* 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 *//* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP *//* USER CODE END PFP *//* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
#include "Function.h"
#include "oled.h"
#include "lora.h"
/* 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_DMA_Init();MX_I2C3_Init();MX_TIM3_Init();MX_USART2_UART_Init();MX_SPI1_Init();MX_TIM7_Init();/* USER CODE BEGIN 2 */Function_OledInit(50);LORA_Init();HAL_TIM_IC_Start_IT(&htim3, TIM_CHANNEL_3);/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */Function_MyMain();}/* USER CODE END 3 */
}

Function.c:

#include "Function.h"
#include "main.h"
#include "oled.h"
#include "i2c.h"
#include "spi.h"
#include "lora.h"
#include <stdarg.h>
#include <stdio.h>
#include "usart.h"
#include "tim.h"
#include <string.h>unsigned char URXMSG[20];
unsigned char UTXMSG[20];
unsigned char LTXMSG[20];
unsigned char LRXMSG[20];
int BEIGNNUMBER = 0;
int ENDNUMBER = 0;
unsigned char STATETIM = 0;
unsigned char ARRAY1[20];
int PLUSEVALUE = 0;
uint16_t COUNTNUMBER = 0;
unsigned char MEMORDER[20] = {'N', 'F', ' '};void OLED_Write(unsigned char type, unsigned char data){unsigned char WriteData[2];WriteData[0] = type;WriteData[1] = data;HAL_I2C_Master_Transmit(&hi2c3, 0x78, WriteData, 2, 0xff);
}void Function_OledInit(unsigned char ms){HAL_GPIO_WritePin(OLED_Power_GPIO_Port, OLED_Power_Pin, GPIO_PIN_RESET);HAL_Delay(ms);OLED_Init();
}unsigned char SPI_WriteRead(unsigned char address, unsigned char data){unsigned char TxData[2], RxData[2];TxData[0] = address;TxData[1] = data;HAL_GPIO_WritePin(SPI1_NSS_GPIO_Port, SPI1_NSS_Pin, GPIO_PIN_RESET);HAL_SPI_TransmitReceive(&hspi1, TxData, RxData, sizeof(TxData), 0xff);HAL_GPIO_WritePin(SPI1_NSS_GPIO_Port, SPI1_NSS_Pin, GPIO_PIN_SET);return RxData[1];
}void Function_ArrayClean(unsigned char* array, uint16_t len){for(unsigned char i = 0; i < len; i ++) array[i] = '\0';
}void myprintf(unsigned char address, const char* format, ...) {char ARRAY[40];// 使用va_list和va_start来处理可变参数va_list args;va_start(args, format);// 使用vsprintf将可变参数列表格式化的字符串存储到ARRAY中vsprintf(ARRAY, format, args);// 清理可变参数列表va_end(args);// 假设OLED_ShowString函数可以在OLED屏幕上显示字符串OLED_ShowString(address, (unsigned char*)ARRAY);
}void Function_UartTxOk(){HAL_UART_Transmit(&huart2, (unsigned char* )"OK ", 5, 0xff);
}void Function_UartTxError(){HAL_UART_Transmit(&huart2, (unsigned char* )"ERROR ", 8, 0xff);
}void Function_HandleURxMsg(){if(URXMSG[0] == '$' && URXMSG[1] == '\0'){LORA_Tx((unsigned char* )"$", 1);}if(URXMSG[0] == '?' && URXMSG[1] == '\0'){LORA_Tx((unsigned char* )"?", 1);}if(URXMSG[0] == '@' && URXMSG[1] == '\0'){sprintf((char* )LTXMSG, "%d", PLUSEVALUE);LORA_Tx(LTXMSG, 10);	Function_ArrayClean(LTXMSG, sizeof(LTXMSG));	}if(URXMSG[0] == 'F'){if(strncmp((char* )URXMSG, "FS1:", 4) == 0 || strncmp((char* )URXMSG, "FS2:", 4) == 0)	LORA_Tx(URXMSG, 20);  // 判断是不是正确的else Function_UartTxError(); }unsigned char temp = URXMSG[0];if(temp == '$' && URXMSG[1] == '\0'){  // 切换和同步命令需要返还OKFunction_UartTxOk();  // 返还OKFunction_ArrayClean(URXMSG, sizeof(URXMSG));  // 清理}		if(((temp == '?' || temp == '@') && URXMSG[1] == '\0') || temp == 'F'){  // 参数和查询指令交给B端处理后统一返还Function_ArrayClean(URXMSG, sizeof(URXMSG));}		 if(URXMSG[0] != '\0') {  // 接收了其他垃圾消息Function_ArrayClean(URXMSG, sizeof(URXMSG));Function_UartTxError();  // 返还错误}
}void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){  // 10msif(COUNTNUMBER < 300) COUNTNUMBER ++;else{COUNTNUMBER = 0;HAL_GPIO_WritePin(LD5_GPIO_Port, LD5_Pin, GPIO_PIN_SET);  // 随手关灯}
}void Function_LoRxMsg(){  // B端处理后的结果LORA_Rx(LRXMSG);if(LRXMSG[0] != '\0'){if(LRXMSG[0] == '0') Function_UartTxError();  // A端接收的数据不正确else if(LRXMSG[0] == 'R' || LRXMSG[0] == 'N'){  // 接收到LORB传递的数据HAL_UART_Transmit(&huart2, LRXMSG, strlen((char* )LRXMSG), 0xff);HAL_TIM_Base_Start_IT(&htim7);  // 开启定时器HAL_GPIO_WritePin(LD5_GPIO_Port, LD5_Pin, GPIO_PIN_RESET);  // 开灯}else if(LRXMSG[0] == '1') Function_UartTxOk();  // A端接收的数据正确Function_ArrayClean(LRXMSG, sizeof(LRXMSG));  // 清除接收的数据}}void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim){//OLED_ShowString(0, "ok");if(STATETIM == 0){STATETIM ++;BEIGNNUMBER = HAL_TIM_ReadCapturedValue(&htim3, TIM_CHANNEL_3);__HAL_TIM_SET_CAPTUREPOLARITY(&htim3, TIM_CHANNEL_3, TIM_ICPOLARITY_FALLING);}else if(STATETIM == 1){STATETIM ++;__HAL_TIM_SET_CAPTUREPOLARITY(&htim3, TIM_CHANNEL_3, TIM_ICPOLARITY_RISING);}else if(STATETIM == 2){STATETIM ++;ENDNUMBER = HAL_TIM_ReadCapturedValue(&htim3, TIM_CHANNEL_3);}
}void Function_UartRxMsg(){HAL_UARTEx_ReceiveToIdle_IT(&huart2, URXMSG, 50);if(URXMSG[0] != '\0'){HAL_Delay(10);  // 让cpu等待DMA把数据接收完memcpy(MEMORDER, URXMSG, 20);Function_HandleURxMsg();}
}void Function_PluseShow(){if(STATETIM == 3){PLUSEVALUE = (int)(1000000 * 1.0 / (ENDNUMBER - BEIGNNUMBER));myprintf(2, "     %dHZ      ",  PLUSEVALUE);//myprintf(0, "   %d  ", ENDNUMBER - BEIGNNUMBER); //myprintf(2, "   %.1f   ", (ENDNUMBER - BEIGNNUMBER) / 10.0);STATETIM = 0;HAL_Delay(200);}
}void Function_MyMain(){Function_UartRxMsg();//myprintf(0, URXMSG);myprintf(0, "     %s       ", MEMORDER);  // 显示最近一次接收到的数据Function_LoRxMsg();Function_PluseShow();//Function_HandleURxMsg();
}

Function.h:

#ifndef __FUNCTION_H__
#define __FUNCTION_H__
#include "main.h"void OLED_Write(unsigned char type, unsigned char data);void Function_OledInit(unsigned char ms);void Function_MyMain();void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim);void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);#endif

(2) B板:

[1] CUBMX配置:

[2] keil5代码:

main.c:

#include "main.h"
#include "adc.h"
#include "i2c.h"
#include "spi.h"
#include "tim.h"
#include "gpio.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes *//* 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 *//* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP *//* USER CODE END PFP *//* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
#include "Function.h"
#include "oled.h"
#include "lora.h"
/* 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_I2C3_Init();MX_SPI1_Init();MX_TIM2_Init();MX_TIM7_Init();MX_ADC_Init();/* USER CODE BEGIN 2 */Function_OledInit(50);HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);  // 开启方波 1kHZHAL_TIM_Base_Start_IT(&htim7);LORA_Init();/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */Function_MyMain();}/* USER CODE END 3 */
}

Function.c

#include "Function.h"
#include "main.h"
#include "i2c.h"
#include "oled.h"
#include <stdio.h>
#include "tim.h"
#include "adc.h"
#include <stdarg.h>
#include "spi.h"
#include "lora.h"
#include <string.h>
#include <stdlib.h>float FS1 = 6.0;
float FS2 = 6.0;
float F1VL = 0;
float F2VL = 0;
unsigned char STATEADC = 0;  // ADC状态
unsigned char OLEDSHOW = 0;  // OLED显示
uint16_t COUNTNUM = 0;
unsigned char LEDSTATE = 0;
float DERTF1F2 = 0;  // 获取FS1与FS2差值 / 0.2
unsigned char INDEX = 7;  // 算一下AA中第一个A的具体位置
unsigned char MEMWINNER[20] = {'N', 'F', ' '};
uint16_t ADCRUNNUM = 0;
unsigned char RUNSHOWARR[20];
unsigned char LORXMSG[20];
int NEWPWM = 0;
int CLK = 32000000;
int MAINDRT = 32000000;
int INDEXX = 0;
int INDEXY = 0;  // 获取要调的参数void OLED_Write(unsigned char type, unsigned char data){unsigned char WriteData[2];WriteData[0] = type;WriteData[1] = data;HAL_I2C_Master_Transmit(&hi2c3, 0x78, WriteData, 2, 0xff);
}void Function_OledInit(unsigned char ms){HAL_GPIO_WritePin(OLED_Power_GPIO_Port, OLED_Power_Pin, GPIO_PIN_RESET);HAL_Delay(ms);OLED_Init();
}unsigned char SPI_WriteRead(unsigned char address, unsigned char data){unsigned char TxData[2], RxData[2];TxData[0] = address;TxData[1] = data;HAL_GPIO_WritePin(SPI1_NSS_GPIO_Port, SPI1_NSS_Pin, GPIO_PIN_RESET);HAL_SPI_TransmitReceive(&hspi1, TxData, RxData, sizeof(TxData), 0xff);HAL_GPIO_WritePin(SPI1_NSS_GPIO_Port, SPI1_NSS_Pin, GPIO_PIN_SET);return RxData[1];
}void myprintf(unsigned char address, const char* format, ...) {char ARRAY[40];// 使用va_list和va_start来处理可变参数va_list args;va_start(args, format);// 使用vsprintf将可变参数列表格式化的字符串存储到ARRAY中vsprintf(ARRAY, format, args);// 清理可变参数列表va_end(args);// 假设OLED_ShowString函数可以在OLED屏幕上显示字符串OLED_ShowString(address, (unsigned char*)ARRAY);
}void Function_ArrayClean(unsigned char* array, uint16_t len){for(unsigned char i = 0; i < len; i ++) array[i] = '\0';
}void Function_GetAdc(){uint16_t AdcData[2];float AdcValue[2];for(unsigned char i = 0; i < 2; i ++){HAL_ADC_Start(&hadc);HAL_ADC_PollForConversion(&hadc, 0xff);AdcData[i] = HAL_ADC_GetValue(&hadc);AdcValue[i] = AdcData[i] * 3.30f / 4095;}HAL_ADC_Stop(&hadc);F1VL = FS1 / 3.0 * AdcValue[1] - 0.1 * FS1;F2VL = FS2 / 3.0 * AdcValue[0] - 0.1 * FS1;
}void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){  // 按键//OLED_ShowString(0, "we");OLEDSHOW = (OLEDSHOW + 1) % 3;
}void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){  // 10ms中断一次/* 为run状态服务 */if(STATEADC == 2){   if(ADCRUNNUM % 20 == 0) Function_GetAdc();  // 按题意理解采集器在run状态才会采集且采集间隔为0.2sADCRUNNUM ++;// 更新A的坐标if(F1VL >= F2VL){DERTF1F2 = (int)((F1VL - F2VL) / 0.2);  // 记得要强转int一下,注意(int)的优先级if(DERTF1F2 >= 7) INDEX = 0;  // 更新A的坐标else INDEX = 7 - DERTF1F2;}else{DERTF1F2 = (int)((F2VL - F1VL) / 0.2);if(DERTF1F2 + 7 >= 14) INDEX = 14;else INDEX = 7 + DERTF1F2;}if(INDEX == 0 || INDEX == 14){  // 判断AA是否在左右两边if(COUNTNUM < 500) COUNTNUM ++;else{  // 坚持5s,记录获胜者COUNTNUM = 0;ADCRUNNUM = 0;STATEADC = 0;if(INDEX == 0) sprintf((char* )MEMWINNER, "RP1:%.1f    ", F1VL); else sprintf((char* )MEMWINNER, "RP2:%.1f ", F2VL);LEDSTATE = 1;  // 有人获胜开启LD5}}else COUNTNUM = 0;  // AA没在边缘不记时}/* 为LED闪烁服务 */if(LEDSTATE == 1){    if(COUNTNUM < 500){if(COUNTNUM % 10 == 0) HAL_GPIO_TogglePin(LD5_GPIO_Port, LD5_Pin);  // 0.1s也就是100ms,整10倍数闪烁一次即可COUNTNUM ++;}else{COUNTNUM = 0;LEDSTATE = 0;HAL_GPIO_WritePin(LD5_GPIO_Port, LD5_Pin, GPIO_PIN_SET);  // 将LD5灯关掉}}}void Function_RunStateShow(){for(unsigned char i = 0; i < 16; i ++) RUNSHOWARR[i] = '#';   RUNSHOWARR[INDEX] = 'A';RUNSHOWARR[INDEX + 1] = 'A';  // 填充 myprintf(0, "      RUN       ");myprintf(2, (char* )RUNSHOWARR);
}void Function_OledShow(){if(OLEDSHOW == 0){if(STATEADC == 0){myprintf(0, "      Idle      ");myprintf(2, "#######AA#######");}else if(STATEADC == 1){myprintf(0, "      Ready     ");myprintf(2, "#######AA#######");}else if(STATEADC == 2){Function_RunStateShow();}}else if(OLEDSHOW == 1){myprintf(0, "    F1:%.1fKN    ", F1VL);myprintf(2, "    F2:%.1fKN    ", F2VL);		}else if(OLEDSHOW == 2){myprintf(0, "    FS1:%.1fKN   ", FS1);myprintf(2, "    FS2:%.1fKN   ", FS2);//myprintf(2, "      kkkk      ");}
}void Function_PwmChange(){  // 传过来的PWM不一定能整除,选择最接近的PWMNEWPWM = (int)strtof((char* )LORXMSG, NULL);  // 获取要配置的新的PWMMAINDRT = CLK;for(int i = 1; i <= 65535; i ++){for(int j = 1; j <= 65535; j ++){if(i * j * NEWPWM - CLK > MAINDRT) break;  // 差值太大说明j太大int temp = abs(i * j * NEWPWM - CLK); if(temp <= MAINDRT){  // 如果差值很小MAINDRT = temp;INDEXX = i;INDEXY = j;}}if(MAINDRT == 0) break;  // 能整除就没必要继续了}__HAL_TIM_SET_PRESCALER(&htim2, INDEXX - 1);__HAL_TIM_SET_AUTORELOAD(&htim2, INDEXY - 1);  // 修改预分频与自动重装载//myprintf(0, "MIN: %d    ", MAINDRT); //myprintf(2, "NPM: %d    ",CLK / INDEXX / INDEXY);//myprintf(2, "%d %d", INDEXX, INDEXY);
}void Function_LoRxMsg(){LORA_Rx(LORXMSG);//myprintf(0, LORXMSG);if(LORXMSG[0] == '$'){  // 切换模式STATEADC = (STATEADC + 1) % 3;//myprintf(0, "%d", STATEADC);}if(LORXMSG[0] == '?'){  // 发送上一次的胜利者LORA_Tx(MEMWINNER, sizeof(MEMWINNER));}if(LORXMSG[0] >= '0' && LORXMSG[0] <= '9'){  // 传回了脉冲信号//myprintf(2, "%d", STATEADC);if(STATEADC == 0){Function_PwmChange();LORA_Tx((unsigned char* )"1", 1);}else LORA_Tx((unsigned char* )"0", 1);  // 传回报错信息 }if(LORXMSG[0] == 'F'){  // 修改命令unsigned char memfs[20];memcpy(memfs, LORXMSG + 4, 10);char* q = NULL;float temp = strtof((char* )memfs, &q);if(*q != '\0') LORA_Tx((unsigned char* )"0", 1);  // 错误数据else if(LORXMSG[2] == '1'){FS1 = temp;LORA_Tx((unsigned char* )"1", 1);}else if(LORXMSG[2] == '2'){FS2 = temp;LORA_Tx((unsigned char* )"1", 1);  // 返回成功信息}//myprintf(0, "temp: %.1f", temp);//myprintf(2, "F1: %.1f F2: %.1f", FS1, FS2);}if(LORXMSG[0] != '\0') Function_ArrayClean(LORXMSG, sizeof(LORXMSG));
}void Function_K1K2Ctrl(){if(STATEADC == 0){  // 空闲HAL_GPIO_WritePin(K1_GPIO_Port, K1_Pin, GPIO_PIN_RESET);HAL_GPIO_WritePin(K2_GPIO_Port, K2_Pin, GPIO_PIN_RESET);}else if(STATEADC == 1){HAL_GPIO_WritePin(K1_GPIO_Port, K1_Pin, GPIO_PIN_SET);HAL_GPIO_WritePin(K2_GPIO_Port, K2_Pin, GPIO_PIN_RESET);}else if(STATEADC == 2){HAL_GPIO_WritePin(K1_GPIO_Port, K1_Pin, GPIO_PIN_SET);HAL_GPIO_WritePin(K2_GPIO_Port, K2_Pin, GPIO_PIN_SET);}
}	void Function_MyMain(){Function_LoRxMsg();Function_K1K2Ctrl();Function_OledShow();//myprintf(0, "%d,%c,%s,%.1fH", 20, 'a', "hello", 11.1);}

Function.h:

#ifndef __FUNCTION_H__
#define __FUNCTION_H__
#include "main.h"void OLED_Write(unsigned char type, unsigned char data);void Function_OledInit(unsigned char ms);void Function_MyMain();void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);void myprintf(unsigned char address, const char* format, ...);unsigned char SPI_WriteRead(unsigned char address, unsigned char data);#endif

2、代码解析:

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

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

相关文章

计算机发展史 | 从起源到现代技术的演进

computer | Evolution from origins to modern technology 今天没有参考资料哈哈 PPT&#xff1a;&#xff08;评论区&#xff1f;&#xff09; 早期计算工具 算盘 -算盘是一种手动操作的计算辅助工具&#xff0c;起源于中国&#xff0c;迄今已有2600多年的历史&#xff0c;是…

实验9 静态路由配置

实验9 静态路由配置 一、 原理描述二、 实验目的三、 实验内容四、 实验配置五、 实验步骤 一、 原理描述 网络中的每个路由器都会维护一张路由表或转发表。路由表的表项记录着目的网络信息以及下一跳I 地址。路由表可以手动配置&#xff0c;也可以通过路由算法动态生成。静态…

使用 MDC 实现日志链路跟踪,包教包会!

在微服务环境中&#xff0c;我们经常使用 Skywalking、Spring Cloud Sleut 等去实现整体请求链路的追踪&#xff0c;但是这个整体运维成本高&#xff0c;架构复杂&#xff0c;本次我们来使用 MDC 通过 Log 来实现一个轻量级的会话事务跟踪功能&#xff0c;需要的朋友可以参考一…

小世界网络生成及其分析

研究背景: 小世界网络是一种介于规则网络和随机网络之间的网络模型,具有短平均路径和高聚集性的特点。这种网络模型被广泛应用于社交网络、互联网、生物网络等领域的研究中。研究小世界网络的生成和分析可以帮助我们理解和揭示复杂网络的结构和特性,以及网络中信息传播、动力…

数据驱动的未来:数据融合与平台化应用的探索

随着大数据时代的到来&#xff0c;数据驱动的决策制定已成为企业与组织的核心。本文探讨了数据驱动的概念&#xff0c;数据融合的技术及其重要性&#xff0c;并分析了平台化应用如何促进数据的有效利用和价值创造。 数据驱动的决策制定 在信息化时代的浪潮中&#xff0c;数据已…

Flutter之旅:探索安卓与跨平台开发的无限可能

随着移动互联网的飞速发展,移动应用开发已成为企业竞争的重要战场。在众多开发框架中,Flutter凭借其高效的性能和出色的跨平台能力,正引领着一场安卓与跨平台开发的奇幻之旅。本文将从Flutter的起源、特点、优势以及未来展望等方面,深入探讨Flutter在移动应用开发领域的无限…

su和sudu、三剑客中的sed、awk命令

一、用户授权 如果普通用户需要执行特殊操作&#xff0c;有两种方法&#xff1a; su -root 切换到root账户进行特殊操作&#xff0c;然后再回到普通用户 sudo 命令 su命令&#xff1a; 优点&#xff1a;使用简单 缺点&#xff1a;root密码容易泄露 普通用户执行操作不可控 su…

官宣!2024 MongoDB Developer Day来了!北上深三场等你集结!

北上深开发者 专为你们打造的 MongoDB Developer Day 来了&#xff01; 动手实操工作坊➕模型设计优化专场 学习 NoSQL 数据建模的最佳实践 深入探索 MongoDB 的各种可能性 和开发者同行和 MongoDB 技术专家 一起度过充实的一天&#xff01; 北京&#xff08;6/22&…

HBuilderx uniapp启动微信小程序报错[error] Error: Fail to open IDE

1、打开微信呢开发者工具&#xff0c;添加项目 创建小程序--目录&#xff08;目录选择自己小程序项目下的dist/dev/mp-weixin&#xff09;点击确定之后微信开发者工具会自己去编译&#xff0c;等待一会便好&#xff0c;查看微信开发者工具控制台是否有报错日志 如果发现[插件 w…

Yshop框架的小程序登录

1配置 根据请求头去判断&#xff0c;走小程序&#xff0c;还是Pc端。 #jwt jwt:header: Authorization#小程序前缀 请求头mini-program-header: MiAuthorization# 令牌前缀token-start-with: Bearersecret: k09BQnaF# 必须使用最少88位的Base64对该令牌进行编码base64-secret…

6.13 CO-RE(Compile Once – Run Everywhere)简介

写在前面 BPF CO-RE 即Compile Once – Run Everywhere,编译一次——到处运行。BPF CO-RE是为了解决BPF的可移植性而存在,也就是说编写一个BPF程序,该程序能够成功编译、通过内核验证,并且能够在不同的内核版本上正确运行,而无需为每个特定的内核重新编译。 一,BPF可移…

科技与环保

科技与环保之间存在着密不可分的关系&#xff0c;两者相互影响、相互促进&#xff0c;共同推动着社会的可持续发展。以下是对科技与环保关系的详细分析&#xff1a; 一、科技进步对环保的积极作用 提供技术手段和解决方案&#xff1a;科技进步为环境保护提供了强有力的技术支…

maven项目中报错 could not find class that it depends on找不到所依赖的类

maven工程在程序编译时报错&#xff0c;could not find class that it depends on找不到所依赖的类。 能够引起这种错误的原因&#xff1a;jar包缺失、jar包冲突、jar包不完整、IDE工具问题。 本次解决方案&#xff1a;删除本地仓库中的maven项目&#xff0c;重新install项目&a…

Vue05-数据绑定

一、数据绑定 1-1、v-bind指令 1-2、v-model指令 1、单项数据绑定&#xff1a; 2、双向数据绑定 注意&#xff1a; 表单元素&#xff0c;必须要有属性&#xff1a;value&#xff01;&#xff01;&#xff01; 1-3、小结

【数据库系统概论】触发器

【数据库系统概论】触发器 概述 在数据库系统中&#xff0c;触发器&#xff08;Trigger&#xff09;是一种特殊的存储过程&#xff0c;当特定事件在数据库表上发生时&#xff0c;会自动执行。触发器主要用于确保数据的完整性、一致性和实现复杂的业务规则。触发器是由用户定义…

电拖基础JIAOXUE

1.最简单的TT马达&#xff0c;实际就是一个减速电机&#xff1a; 减速箱的内部包含了一组齿轮。在实际的使用中&#xff0c;绝大部分的电动机都要和减速箱配合使用&#xff0c;因为一般的电机转速都在每分钟几千转甚至1万转以上&#xff0c;而在实际的使用中并不需要这么快的转…

PSO-LSSVM-Adaboost分类模型,粒子群算法优化基于最小二乘支持向量机结合Adaboost的数据分类-附代码

PSO-LSSVM-Adaboost是一种结合PSO-LSSVM和AdaBoost两种机器学习技术的方法&#xff0c;旨在提升模型的性能和鲁棒性。具体来说&#xff0c;AdaBoost是一种集成学习方法&#xff0c;通过组合多个弱分类器来形成一个强分类器&#xff0c;每个分类器针对不同的数据集和特征进行训练…

测试记录3:WLS2运行Linux界面

1.WLS1转到WLS2 &#xff08;1&#xff09;根据自己的平台&#xff0c;下载WLS2安装包 x64: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi arm64: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_arm64.msi &#xff08;2&…

Oracle和Random Oracle

Oracle和Random Oracle 在计算机理论里面经常可以看到oracle&#xff0c;这个oracle可以是一个程序 一片代码 一个算法 一个机器 也可以是一个函数 甚至是一个关系。但我们只能知道这个oracle能做什么&#xff0c;不清楚他是怎么做的。所以经常讲其称为黑箱。推广一点&#xf…

音频数据上的会话情感分析

情感分析&#xff0c;也被称为观点挖掘&#xff0c;是自然语言处理(NLP)中一个流行的任务,因为它有着广泛的工业应用。在专门将自然语言处理技术应用于文本数据的背景下,主要目标是训练出一个能够将给定文本分类到不同情感类别的模型。下图给出了情感分类器的高级概述。 例如,三…