要用到Bootloader升级,APP部分要写运行日志。所以在Bootloader部分的FATFS要做裁剪,裁剪到只剩只读的操作就可以了,而APP端做可读可写。
用的是野火的STM32F103VETx指南者
STM32CubeMx 和 Keil5
我用的是4线 Bit的配置,时钟尽量不要太高,我这里用了36分频,最终具体的频率要自己算一下。
然后配置FATFS,User-defined我建议是选上,对初学者的一次成功概率要更高一点。
要使能第二行的FS_READONLY的话,要让最后一行的FS_LOCK设置成0才能看到选项(这个是设置成只读的配置,其他的写啥的f_write,基本都不能用,为了省空间)
第二、三行我就不做解释,后面我会放个链接,你们可以看看大概是做什么的。
从CODE_PAGE开始,按照顺序,设置英文、使能栈的缓存,最大的LFN为64(默认是255,如果跟我一样设置为64,那么SD里面的文件名超过64字的长度的话,可能会出现f_open失败的情况,请按照个人情况设置)
这两个链接里面有涉及到FATFS的裁剪部分的说明,其实占空间最大的是这个选项,如果你选择了兼容汉字的话,我编译出来是190K左右,基本玩不了的。
还有一些其他的配置,基本都懂的
最后的栈空间最好设置大一下,保证SDIO不会溢出
最后附上代码,有点长。如果你的CubeMx的设置跟我一样的话,可以直接复制。记得要勾上微库选项,以及printf的重定向。
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "fatfs.h"
#include "sdio.h"
#include "usart.h"
#include "gpio.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
FATFS fs; /* FatFs文件系统对象 */
FIL file; /* 文件对象 */
FRESULT f_res; /* 文件操作结果 */
UINT fnum; /* 文件成功读写数量 */
BYTE ReadBuffer[1024]={0}; /* 读缓冲区 */
BYTE WriteBuffer[]= "Welcome to the wildfire STM32 development board. Today is a good day to create new file system test files\r\n";
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
#define DBGPRINTF printf
/**
* @brief 打印输出信息
* @param 无
* @retval 无
*/
void printf_fatfs_error(FRESULT fresult)
{
switch(fresult)
{
case FR_OK:
DBGPRINTF("!!The operation was successful.\r\n");
break;
case FR_DISK_ERR:
DBGPRINTF("!!Hardware I / O driver error.\r\n");
break;
case FR_INT_ERR:
DBGPRINTF("!!Assertion error.\r\n");
break;
case FR_NOT_READY:
DBGPRINTF("!!The physical device is not working.\r\n");
break;
case FR_NO_FILE:
DBGPRINTF("!!Unable to find file.\r\n");
break;
case FR_NO_PATH:
DBGPRINTF("!!The path could not be found.\r\n");
break;
case FR_INVALID_NAME:
DBGPRINTF("!!Invalid pathname.\r\n");
break;
case FR_DENIED:
case FR_EXIST:
DBGPRINTF("!!Access denied.\r\n");
break;
case FR_INVALID_OBJECT:
DBGPRINTF("!!Invalid file or path.\r\n");
break;
case FR_WRITE_PROTECTED:
DBGPRINTF("!!Logical device write protection.\r\n");
break;
case FR_INVALID_DRIVE:
DBGPRINTF("!!Invalid logical device.\r\n");
break;
case FR_NOT_ENABLED:
DBGPRINTF("!!Invalid workspace.\r\n");
break;
case FR_NO_FILESYSTEM:
DBGPRINTF("!!Invalid file system.\r\n");
break;
case FR_MKFS_ABORTED:
DBGPRINTF("!!Fmkfs function operation failed due to function parameter problem.\r\n");
break;
case FR_TIMEOUT:
DBGPRINTF("!!The operation timed out.\r\n");
break;
case FR_LOCKED:
DBGPRINTF("!!The file is protected.\r\n");
break;
case FR_NOT_ENOUGH_CORE:
DBGPRINTF("!!Long file name support failed to get heap space.\r\n");
break;
case FR_TOO_MANY_OPEN_FILES:
DBGPRINTF("!!Too many files open.\r\n");
break;
case FR_INVALID_PARAMETER:
DBGPRINTF("!!Invalid parameter.\r\n");
break;
}
}
/* 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 */
/* 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_SDIO_SD_Init();
MX_USART1_UART_Init();
MX_FATFS_Init();
/* USER CODE BEGIN 2 */
DBGPRINTF("\r\r\n****** This is a SD card file system experiment ******\r\n");
// 注册一个FatFS设备:SD卡 //
if(FATFS_LinkDriver(&SD_Driver, SDPath) == 0)
{
//在SD卡挂载文件系统,文件系统挂载时会对SD卡初始化
f_res = f_mount(&fs,(TCHAR const*)SDPath,1);
printf_fatfs_error(f_res);
//----------------------- 格式化测试 ---------------------------//
// 如果没有文件系统就格式化创建创建文件系统 */
if(f_res!=FR_OK)
{
DBGPRINTF("The SD card failed to mount the file system.(%d)\r\n",f_res);
printf_fatfs_error(f_res);
while(1);
}
else
{
DBGPRINTF("The file system is mounted successfully and can be read and written\r\n");
}
//------------------- 文件系统测试:读测试 ------------------------------------//
DBGPRINTF("****** File read test is about to take place... ******\r\n");
f_res = f_open(&file, "FatFsRWFiles.txt", FA_OPEN_EXISTING | FA_READ);
printf_fatfs_error(f_res);
if(f_res == FR_OK)
{
DBGPRINTF("File opened successfully.\r\n");
f_res = f_read(&file, ReadBuffer, sizeof(ReadBuffer), &fnum);
if(f_res==FR_OK)
{
DBGPRINTF("File read successfully, read byte data: %d\r\n",fnum);
DBGPRINTF("The obtained file data are as follows:\r\n%s \r\n", ReadBuffer);
}
else
{
DBGPRINTF("File read failure:(%d)\r\n",f_res);
}
}
else
{
DBGPRINTF("Failed to open file.\r\n");
}
// 不再读写,关闭文件 //
f_close(&file);
// 不再使用,取消挂载 //
f_res = f_mount(NULL,(TCHAR const*)SDPath,1);
}
// 注销一个FatFS设备:SD卡 //
FATFS_UnLinkDriver(SDPath);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** 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.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
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_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/* USER CODE BEGIN 4 */
/* 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 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
如果没有玩过linux/windows开发的话,这里可以更改你想读SD里面的哪个文件。当然前提是,你SD里面有这个文件才行。
需要注意的是,里面的并非是字符,而是十六进制,可以看到最后的0d 0a 00是不是很熟悉,不就是\r\n吗。
在上面的基础上,只需要更改FATFS部分的配置即可。
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2021 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
* www.st.com/SLA0044
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "fatfs.h"
#include "sdio.h"
#include "usart.h"
#include "gpio.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.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 */
FATFS fs; /* FatFs文件系统对象 */
FIL file; /* 文件对象 */
FRESULT f_res; /* 文件操作结果 */
UINT fnum; /* 文件成功读写数量 */
BYTE ReadBuffer[1024]={0}; /* 读缓冲区 */
BYTE WriteBuffer[]= "Welcome to the wildfire STM32 development board. Today is a good day to create new file system test files\r\n";
#define DBGPRINTF printf
void printf_fatfs_error(FRESULT fresult)
{
switch(fresult)
{
case FR_OK:
DBGPRINTF("!!The operation was successful.\r\n");
break;
case FR_DISK_ERR:
DBGPRINTF("!!Hardware I / O driver error.\r\n");
break;
case FR_INT_ERR:
DBGPRINTF("!!Assertion error.\r\n");
break;
case FR_NOT_READY:
DBGPRINTF("!!The physical device is not working.\r\n");
break;
case FR_NO_FILE:
DBGPRINTF("!!Unable to find file.\r\n");
break;
case FR_NO_PATH:
DBGPRINTF("!!The path could not be found.\r\n");
break;
case FR_INVALID_NAME:
DBGPRINTF("!!Invalid pathname.\r\n");
break;
case FR_DENIED:
case FR_EXIST:
DBGPRINTF("!!Access denied.\r\n");
break;
case FR_INVALID_OBJECT:
DBGPRINTF("!!Invalid file or path.\r\n");
break;
case FR_WRITE_PROTECTED:
DBGPRINTF("!!Logical device write protection.\r\n");
break;
case FR_INVALID_DRIVE:
DBGPRINTF("!!Invalid logical device.\r\n");
break;
case FR_NOT_ENABLED:
DBGPRINTF("!!Invalid workspace.\r\n");
break;
case FR_NO_FILESYSTEM:
DBGPRINTF("!!Invalid file system.\r\n");
break;
case FR_MKFS_ABORTED:
DBGPRINTF("!!Fmkfs function operation failed due to function parameter problem.\r\n");
break;
case FR_TIMEOUT:
DBGPRINTF("!!The operation timed out.\r\n");
break;
case FR_LOCKED:
DBGPRINTF("!!The file is protected.\r\n");
break;
case FR_NOT_ENOUGH_CORE:
DBGPRINTF("!!Long file name support failed to get heap space.\r\n");
break;
case FR_TOO_MANY_OPEN_FILES:
DBGPRINTF("!!Too many files open.\r\n");
break;
case FR_INVALID_PARAMETER:
DBGPRINTF("!!Invalid parameter.\r\n");
break;
}
}
/* 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 */
/* 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_SDIO_SD_Init();
MX_USART1_UART_Init();
MX_FATFS_Init();
/* USER CODE BEGIN 2 */
DBGPRINTF("\r\r\n****** This is a SD card file system experiment ******\r\n");
// 注册一个FatFS设备:SD卡 //
if(FATFS_LinkDriver(&SD_Driver, SDPath) == 0)
{
//在SD卡挂载文件系统,文件系统挂载时会对SD卡初始化
f_res = f_mount(&fs,(TCHAR const*)SDPath,1);
printf_fatfs_error(f_res);
//----------------------- 格式化测试 ---------------------------//
// 如果没有文件系统就格式化创建创建文件系统 */
if(f_res == FR_NO_FILESYSTEM)
{
DBGPRINTF("The SD card does not have a file system yet and will be formatted...\r\n");
// 格式化 //
f_res=f_mkfs((TCHAR const*)SDPath,0,0);
if(f_res == FR_OK)
{
DBGPRINTF("The SD card has successfully formatted the file system\r\n");
// 格式化后,先取消挂载 //
f_res = f_mount(NULL,(TCHAR const*)SDPath,1);
// 重新挂载 //
f_res = f_mount(&fs,(TCHAR const*)SDPath,1);
}
else
{
DBGPRINTF("Format failed\r\n");
while(1);
}
}
else if(f_res!=FR_OK)
{
DBGPRINTF("The SD card failed to mount the file system.(%d)\r\n",f_res);
printf_fatfs_error(f_res);
while(1);
}
else
{
DBGPRINTF("The file system is mounted successfully and can be read and written\r\n");
}
//----------------------- 文件系统测试:写测试 -----------------------------//
// 打开文件,如果文件不存在则创建它 //
DBGPRINTF("****** A file write test will be performed... ******\r\n");
f_res = f_open(&file, "unit_sd_rw_test.txt",FA_CREATE_ALWAYS | FA_WRITE );
if ( f_res == FR_OK )
{
DBGPRINTF("Open / create FatFs read / write test file. TXT file successfully, write data to the file.\r\n");
// 将指定存储区内容写入到文件内 //
f_res=f_write(&file,WriteBuffer,sizeof(WriteBuffer),&fnum);
if(f_res==FR_OK)
{
DBGPRINTF("File write success, write byte data:%d\r\n",fnum);
DBGPRINTF("The data written to the file is: \r\n%s\r\n",WriteBuffer);
}
else
{
DBGPRINTF(" File write failure:(%d)\r\n",f_res);
}
// 不再读写,关闭文件 //
f_close(&file);
}
else
{
DBGPRINTF("Failed to open / create file.\r\n");
}
//------------------- 文件系统测试:读测试 ------------------------------------//
DBGPRINTF("****** File read test is about to take place... ******\r\n");
f_res = f_open(&file, "unit_sd_rw_test.txt", FA_OPEN_EXISTING | FA_READ);
if(f_res == FR_OK)
{
DBGPRINTF("File opened successfully.\r\n");
f_res = f_read(&file, ReadBuffer, sizeof(ReadBuffer), &fnum);
if(f_res==FR_OK)
{
DBGPRINTF("File read successfully, read byte data: %d\r\n",fnum);
DBGPRINTF("The obtained file data are as follows:\r\n%s \r\n", ReadBuffer);
}
else
{
DBGPRINTF("File read failure:(%d)\r\n",f_res);
}
}
else
{
DBGPRINTF("Failed to open file.\r\n");
}
// 不再读写,关闭文件 //
f_close(&file);
// 不再使用,取消挂载 //
f_res = f_mount(NULL,(TCHAR const*)SDPath,1);
}
// 注销一个FatFS设备:SD卡 //
FATFS_UnLinkDriver(SDPath);
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** 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.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
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_DIV2;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{
Error_Handler();
}
}
/* USER CODE BEGIN 4 */
/* 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 */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
只要你没有去选择兼容汉字的选项,基本上这个文件系统不会太大。只读和可读可写,在占用空间上相差并不会太大,但MCU上的空间是金子呀【笑哭】。FATFS的选项可能有点选的不太合适,发现的可以在评论区补充一下,
就介绍到这里了!!!有问题可以私聊或在评论区留言
文章浏览阅读290次,点赞8次,收藏10次。1.背景介绍稀疏编码是一种用于处理稀疏数据的编码技术,其主要应用于信息传输、存储和处理等领域。稀疏数据是指数据中大部分元素为零或近似于零的数据,例如文本、图像、音频、视频等。稀疏编码的核心思想是将稀疏数据表示为非零元素和它们对应的位置信息,从而减少存储空间和计算复杂度。稀疏编码的研究起源于1990年代,随着大数据时代的到来,稀疏编码技术的应用范围和影响力不断扩大。目前,稀疏编码已经成为计算...
文章浏览阅读217次。EasyGBS - GB28181 国标方案安装使用文档下载安装包下载,正式使用需商业授权, 功能一致在线演示在线API架构图EasySIPCMSSIP 中心信令服务, 单节点, 自带一个 Redis Server, 随 EasySIPCMS 自启动, 不需要手动运行EasySIPSMSSIP 流媒体服务, 根..._easygbs-windows-2.6.0-23042316使用文档
文章浏览阅读1.2k次,点赞27次,收藏7次。2023巅峰极客 BabyURL之前AliyunCTF Bypassit I这题考查了这样一条链子:其实就是Jackson的原生反序列化利用今天复现的这题也是大同小异,一起来整一下。_原生jackson 反序列化链子
文章浏览阅读734次,点赞9次,收藏7次。微服务架构简单的说就是将单体应用进一步拆分,拆分成更小的服务,每个服务都是一个可以独立运行的项目。这么多小服务,如何管理他们?(服务治理 注册中心[服务注册 发现 剔除])这么多小服务,他们之间如何通讯?这么多小服务,客户端怎么访问他们?(网关)这么多小服务,一旦出现问题了,应该如何自处理?(容错)这么多小服务,一旦出现问题了,应该如何排错?(链路追踪)对于上面的问题,是任何一个微服务设计者都不能绕过去的,因此大部分的微服务产品都针对每一个问题提供了相应的组件来解决它们。_spring cloud
文章浏览阅读5.9k次,点赞6次,收藏20次。Js实现图片点击切换与轮播图片点击切换<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <script type="text/ja..._点击图片进行轮播图切换
文章浏览阅读10w+次,点赞245次,收藏1.5k次。在开始安装前,如果你的电脑装过tensorflow,请先把他们卸载干净,包括依赖的包(tensorflow-estimator、tensorboard、tensorflow、keras-applications、keras-preprocessing),不然后续安装了tensorflow-gpu可能会出现找不到cuda的问题。cuda、cudnn。..._tensorflow gpu版本安装
文章浏览阅读243次。0x00 简介权限滥用漏洞一般归类于逻辑问题,是指服务端功能开放过多或权限限制不严格,导致攻击者可以通过直接或间接调用的方式达到攻击效果。随着物联网时代的到来,这种漏洞已经屡见不鲜,各种漏洞组合利用也是千奇百怪、五花八门,这里总结漏洞是为了更好地应对和预防,如有不妥之处还请业内人士多多指教。0x01 背景2014年4月,在比特币飞涨的时代某网站曾经..._使用物联网漏洞的使用者
文章浏览阅读786次。A. Epipolar geometry and triangulationThe epipolar geometry mainly adopts the feature point method, such as SIFT, SURF and ORB, etc. to obtain the feature points corresponding to two frames of images. As shown in Figure 1, let the first image be and th_normalized plane coordinates
文章浏览阅读708次,点赞2次,收藏3次。开放信息抽取(OIE)系统(三)-- 第二代开放信息抽取系统(人工规则, rule-based, 先关系再实体)一.第二代开放信息抽取系统背景 第一代开放信息抽取系统(Open Information Extraction, OIE, learning-based, 自学习, 先抽取实体)通常抽取大量冗余信息,为了消除这些冗余信息,诞生了第二代开放信息抽取系统。二.第二代开放信息抽取系统历史第二代开放信息抽取系统着眼于解决第一代系统的三大问题: 大量非信息性提取(即省略关键信息的提取)、_语义角色增强的关系抽取
文章浏览阅读1.1w次,点赞6次,收藏51次。快速完成网页设计,10个顶尖响应式HTML5网页模板助你一臂之力为了寻找一个优质的网页模板,网页设计师和开发者往往可能会花上大半天的时间。不过幸运的是,现在的网页设计师和开发人员已经开始共享HTML5,Bootstrap和CSS3中的免费网页模板资源。鉴于网站模板的灵活性和强大的功能,现在广大设计师和开发者对html5网站的实际需求日益增长。为了造福大众,Mockplus的小伙伴整理了2018年最..._html欢迎页面
文章浏览阅读282次。原标题:2018全国计算机等级考试调整,一、二级都增加了考试科目全国计算机等级考试将于9月15-17日举行。在备考的最后冲刺阶段,小编为大家整理了今年新公布的全国计算机等级考试调整方案,希望对备考的小伙伴有所帮助,快随小编往下看吧!从2018年3月开始,全国计算机等级考试实施2018版考试大纲,并按新体系开考各个考试级别。具体调整内容如下:一、考试级别及科目1.一级新增“网络安全素质教育”科目(代..._计算机二级增报科目什么意思
文章浏览阅读240次。conan简单使用。_apt install conan