32+OLED之IIC手撕亚索七级狗牌

news2024/11/23 11:58:21

成品效果:

硬件配方:STM32F103C8T6 + SSD1306

软件配方:字模提取V2.1 CopyLeft By Horse2000 + STM32CubeMX + keil5

 

思路:

1.找到图片,将其转化为128*64 像素大小的二值化图片;【python实现转化】;

python代码:【在vscode 运行并转化图片即可】

from PIL import Image

def convert_to_binary(image_path):
    # 打开原始图片
    image = Image.open(image_path)
    
    # 调整图片大小为128x64像素
    image = image.resize((128, 64))
    
    # 将图片转化为灰度图像
    image = image.convert('L')
    
    # 进行二值化处理
    threshold = 127  # 阈值,可根据实际情况调整
    image = image.point(lambda p: p > threshold and 255)
    
    # 保存处理后的图片为BMP格式
    output_path = "output.bmp"
    image.save(output_path, "BMP")

    return output_path

# 用户输入需要转化的图片地址
input_path = input("请输入需要转化的图片地址:")
output_path = convert_to_binary(input_path)
print("图片转化和二值化完成,输出路径:", output_path)

转化出来不太完美,但是我们有了格式ok的图片就好办了,直接使用windows的图画工具 点一点就OK;展示一下修完的哈撒剋:

眉清目秀 有木有?! 哈哈

2.图片合格了,继续使用字模提取软件 【搜搜就有,俺就不附啦】

 复制是给后面代码来显示哈噻;

3.通过STM32CubeMX 配置iic 并生成工程文件;

 STM32CubeMX 配置iic步骤:

将ssd1306 的数据线和时钟线 插入如下图的PB7、PB6脚;当然不同的芯片/iic通道 插不同的脚就型 都是对应的;

继续:

4.使用keil5撸代码完成手撕哈撒剋!!

main.c 源代码附上:ctrl A,ctrl C , ctrl V,懂的都懂QAQ;(其他代码不用修改,因为已被STM32CubeMX初始化好了)

/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2023 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 "i2c.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 */

//HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress,
//                                   uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout);
/*
hi2c: 指向 I2C_HandleTypeDef 结构体的指针,包含了指定的 I2C 模块的配置信息。
DevAddress: I2C 设备的 7 位从机地址。
MemAddress: 要写入数据的 I2C 设备上的内存地址。  0x00写命令 0x40写数据
MemAddSize: 内存地址的大小。可以是以下值之一:
I2C_MEMADD_SIZE_8BIT:8 位内存地址大小。
I2C_MEMADD_SIZE_16BIT:16 位内存地址大小。
pData: 指向包含要写入的数据的缓冲区的指针。
Size: 要写入的字节数。
Timeout: 超时值,单位为毫秒。
*/

void Oled_Write_Cmd(uint8_t dataCmd)
{
	HAL_I2C_Mem_Write(&hi2c1,0x78,0x00,I2C_MEMADD_SIZE_8BIT,
										&dataCmd,1,0xff);
}
void write_data(uint8_t dataData)
{
	HAL_I2C_Mem_Write(&hi2c1,0x78,0x40,I2C_MEMADD_SIZE_8BIT,
										&dataData,1,0xff);
}


void initOled()
{
	Oled_Write_Cmd(0xAE);//--display off
	Oled_Write_Cmd(0x00);//---set low column address
	Oled_Write_Cmd(0x10);//---set high column address
	Oled_Write_Cmd(0x40);//--set start line address
	Oled_Write_Cmd(0xB0);//--set page address
	Oled_Write_Cmd(0x81); // contract control
	Oled_Write_Cmd(0xFF);//--128
	Oled_Write_Cmd(0xA1);//set segment remap
	Oled_Write_Cmd(0xA6);//--normal / reverse
	Oled_Write_Cmd(0xA8);//--set multiplex ratio(1 to 64)
	Oled_Write_Cmd(0x3F);//--1/32 duty
	Oled_Write_Cmd(0xC8);//Com scan direction
	Oled_Write_Cmd(0xD3);//-set display offset
	Oled_Write_Cmd(0x00);//
	Oled_Write_Cmd(0xD5);//set osc division
	Oled_Write_Cmd(0x80);//
	Oled_Write_Cmd(0xD8);//set area color mode off
	Oled_Write_Cmd(0x05);//
	Oled_Write_Cmd(0xD9);//Set Pre-Charge Period
	Oled_Write_Cmd(0xF1);//
	Oled_Write_Cmd(0xDA);//set com pin configuartion
	Oled_Write_Cmd(0x12);//
	Oled_Write_Cmd(0xDB);//set Vcomh
	Oled_Write_Cmd(0x30);//
	Oled_Write_Cmd(0x8D);//set charge pump enable
	Oled_Write_Cmd(0x14);//
	Oled_Write_Cmd(0xAF);//--turn on oled panel
}

void clearOled()
{
	unsigned char i,j;
	for(i=0;i<8;i++){
		Oled_Write_Cmd(0xB0+i);
		Oled_Write_Cmd(0x00);
		Oled_Write_Cmd(0x10);
		for(j=0;j<128;j++){
			write_data(0);
		}		
	}
}


unsigned char bmp_hasai[] =
{

	/*--  宽度x高度=128x64  --*/
	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0x7F,0x7F,0x3F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,0x07,0x07,0x07,0x05,0x01,
	0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,
	0x03,0x03,0x01,0x03,0x03,0x07,0x1F,0x7F,0xFE,0xFC,0xF0,0xE0,0x86,0x0E,0x3E,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0x01,0x0F,0x3B,0xE2,0x42,0xCC,0x98,0xB0,0x98,0xCC,0x66,0x22,0xF1,0x19,0x0F,0x81,
	0xC1,0xF1,0x39,0x1F,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0x70,
	0x18,0x1D,0x1D,0x1E,0x0E,0x0F,0x0F,0x0F,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,
	0x3F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xF8,0x60,0x00,0x00,0x00,0x80,0x81,0x83,
	0x86,0x84,0x08,0x1F,0x10,0x34,0x2A,0x51,0x51,0x2A,0x24,0x10,0x1F,0x0C,0x03,0x01,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0x0F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x3F,0x3F,
	0x3F,0x1F,0x1F,0xEF,0xFF,0xFF,0xBF,0xBE,0x9E,0xDE,0xCF,0x4F,0x5F,0x5F,0x1F,0x3F,
	0xBF,0xFF,0xFF,0xFF,0x6E,0xB4,0x96,0xD2,0x9A,0xB2,0x76,0xEC,0xC8,0x30,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF9,0xF4,0xFE,0xFF,0xFF,0xF9,0xF6,
	0xF0,0xFE,0xFF,0xFC,0xF8,0xFB,0xFF,0xFF,0xFE,0xFF,0xFC,0xFF,0xFB,0xF8,0xF8,0x78,
	0x78,0x40,0x10,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x03,0x3F,0xFF,0xFF,0xFF,0xFE,0xFC,0xFD,0xFD,0xFD,0xF9,0xF9,0xFB,0xFB,
	0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFD,0xFD,0xFD,0xFF,0x9D,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x0F,0x03,0x03,0x01,0x01,0x01,0x0E,0x78,0xC0,
	0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x20,
	0x00,0xD0,0xD0,0x00,0x38,0xFF,0xFF,0xFF,0xFF,0x1F,0xDF,0xFF,0x7F,0x1F,0xDF,0x1F,
	0x1F,0xFF,0xFF,0x6F,0xA3,0x11,0xE0,0x00,0x00,0x00,0x00,0xE0,0x20,0x90,0xF0,0x60,
	0xB1,0xD3,0xB2,0x7E,0xF8,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xE0,0xE0,0xF0,0xF0,0xF8,0xFC,0xFF,0xE0,
	0xE0,0xCF,0xCF,0xE0,0xE0,0xFF,0xE7,0xF8,0xF8,0xFE,0xFF,0xFF,0xEF,0xE3,0xE9,0xEC,
	0xEC,0xFF,0x7F,0x2F,0x2F,0x20,0x2F,0x28,0x38,0x2C,0x37,0x11,0x0C,0x03,0x1F,0x30,
	0x6F,0x5F,0x6F,0x30,0x1F,0x8F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0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0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
	0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
};

//遍历屏幕,写入;
void catbmp(unsigned char *bmp_kunkun)
{
	unsigned char i;
	unsigned int j;
	for(i=0;i<8;i++){
		Oled_Write_Cmd(0xB0+i);
		Oled_Write_Cmd(0x00);
		Oled_Write_Cmd(0x10);
		for(j=128*i;j<(128*(i+1));j++){
			write_data(bmp_kunkun[j]);                                                                                                                                                                                                                                                                                                                                                                                                                                           
		}		
	}

}

/* 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_I2C1_Init();
  /* USER CODE BEGIN 2 */
	
	//初始化oled;
	initOled();

	//设置页寻址模式
	Oled_Write_Cmd(0x20);
	Oled_Write_Cmd(0x02);


	//清空屏幕 
	clearOled();
	catbmp(bmp_kunkun);
	HAL_Delay(1000);
	
	//清空屏幕
	clearOled();
	catbmp(bmp_hasai);
	HAL_Delay(1000);
	
  /* 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 */

其实源码里还有坤坤,不知道大家有没有发现出来坤坤的一秒钟 !

请看VCR:

STM32+OLED之IIC手撕亚索七级狗牌 【杰哥不要E过去打篮球啦】

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

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

相关文章

Spring --- 创建一个Spring项目

文章目录 创建一个Maven项目添加Spring框架支持添加启动类 创建一个Maven项目 注&#xff1a;我们需要使用 Maven 来管理依赖&#xff0c;所以需要创建一个Maven项目 添加Spring框架支持 注&#xff1a; 添加这两个依赖才能正确使用 Spring在添加依赖后记得刷新&#xff0c;把依…

【开源威胁情报挖掘1】引言 + 开源威胁情报挖掘框架 + 开源威胁情报采集与识别提取

基于开源信息平台的威胁情报挖掘综述 写在最前面摘要1 引言近年来的一些新型网络安全威胁类型挖掘网络威胁的情报信息威胁情报分类&#xff1a;内、外部威胁情报国内外开源威胁情报挖掘分析工作主要贡献研究范围和方法 2 开源威胁情报挖掘框架1. 开源威胁情报采集与识别2. 开源…

浅谈无线测温系统在海上石油平台高压配电盘的应用-安科瑞 蒋静

摘要&#xff1a;海上石油平台的封闭式中高压配电盘在平台电力系统起着十分重要的作用&#xff0c;通过统计其配电盘的 大部分故障为前期的热效应引起&#xff0c;由于配电盘内部空间封闭狭小&#xff0c;所以无法进行人工巡查测温&#xff0c;这给油田的供电系统埋下了一定的潜…

服务器bash进程占用cpu过多疑似中挖矿病毒记录

发现过程 因为我有使用conky的习惯&#xff0c;也就是在桌面上会显示cpu和内存的占用情况&#xff0c;由于服务器不止我一个人使用&#xff0c;最近发现好几次我同学的账户下的bash进程占用特别多&#xff0c;问了他之后&#xff0c;他也说他几次都是没有使用过bash相关服务&a…

【Java】文件I/O-文件系统操作

导读 在文件I/O这一节的知识里&#xff0c;对文件的操作主要分为两大类&#xff1a; ☑️针对文件系统进行的操作 ☑️针对文件内容进行的操作 针对文件系统进行的操作主要是对Java中的File类进行操作。这篇文章里&#xff0c;博主就来带大家看看Java中针对文件系统的一些常…

Vue3水印(Watermark)

APIs 参数说明类型默认值必传width水印的宽度&#xff0c;默认值为 content 自身的宽度numberundefinedfalseheight水印的高度&#xff0c;默认值为 content 自身的高度numberundefinedfalserotate水印绘制时&#xff0c;旋转的角度&#xff0c;单位 number-22falsezIndex追加…

利用数据库的表,生成word文档的表结构注释说明

文章目录 1.场景说明2.解决办法3.生成文档3.1.实现思路3.2.引入Apache POI依赖3.3.获取表及表字段说明Mapper3.4.POI创建文档表格&#xff0c;并填充数据3.5.完整的接口下载代码3.6.效果展示 1.场景说明 在项目中表已经建立好了&#xff0c;但是现在想对外提供一个表的字段的描…

获得文件MD5——校验完整性 window 和 Linux下操作

目录 引出window下获得文件MD5Linux下获得文件MD5单个文件整个目录下所有文件检查MD5 总结 引出 1.Windows 10 自带了一个命令行程序 certutil可以 获取文件的 MD5 值&#xff1b; 2.Linux下md5sum命令获得文件MD5值&#xff1b; window下获得文件MD5 Windows 10 自带了一个命…

python中的简单线性拟合

简单线性回归可以拟合线性关系的数据&#xff0c;一般使用一次函数或二次函数即可。 import numpy as np import matplotlib.pyplot as pltxnp.array([1,2,3,4,5,6,7,8,9,10]) ynp.array([2.5,4.5,4.8,5.5,6.0,7.0,7.8,8.0,9.0,10.0])#一次拟合函数 slope,interceptnp.polyfit…

vs2019 - MFC对话框程序的工程名称不支持下划线命名法

文章目录 vs2019 - MFC对话框程序的工程名称不支持下划线命名法概述笔记备注END vs2019 - MFC对话框程序的工程名称不支持下划线命名法 概述 正在写账单分析程序, 用MFC 对话框. 因为比较习惯下划线命名法, 就在向导中给工程名称起了一个my_test这样的名称(下划线命名法, 小…

亮相史上规模最大高交会,Coremail展现邮件技术创新实力

11月19日&#xff0c;第二十五届中国国际高新技术成果交易会在深圳落下帷幕&#xff0c;作为国内邮件行业引领者&#xff0c;Coremail受邀参展。 展览现场&#xff0c;Coremail邮件解决方案及系列产品受到了众多参观者与业内人士的关注与好评。Coremail XT6邮件系统技术成熟&a…

iOS-打包上架构建版本一直不出现/正在处理/自动消失

iOS开发过程中&#xff0c;打包上架苹果审核是一个不可或缺的环节。说实话&#xff0c;这个问题我遇见两次了&#xff0c;为了让自己长点记性&#xff0c;决定写下来。首先&#xff0c;列举几种情况&#xff1a; 1.iPa包上传至App store后&#xff0c;一个小时内不显示构建版本…

使用Prometheus监控Synology(群辉)

1、简介 在现代的IT环境中&#xff0c;对于服务器和网络设备的监控是至关重要的。Synology&#xff08;群辉&#xff09;作为一种流行的网络存储解决方案&#xff0c;为用户提供了高性能和可靠的存储服务。然而&#xff0c;了解Synology设备的运行状况和性能指标对于确保其正常…

Nodejs+Vue校园餐厅外卖订餐点餐系统 PHP高校食堂 微信小程序_0u4hl 多商家

对于校园订餐小程序将是又一个传统管理到智能化信息管理的改革&#xff0c;对于传统的校园订餐管理&#xff0c;所包括的信息内容比较多&#xff0c;对于用户想要对这些数据进行管理维护需要花费很大的时间信息&#xff0c;而且对于数据的存储比较麻烦&#xff0c;想要查找某一…

为品质加冕 | 喜尔康智家再次斩获大奖

近日&#xff0c;被誉为“家居质量界奥斯卡”的2023年度沸腾质量奖颁奖盛典在福建厦门第三届家居质量大会同期隆重举行。现场重磅揭晓2023年沸腾质量奖测评获奖结果。 今年&#xff0c;喜尔康智能家居再接再厉&#xff0c;从数百家参评企业中脱颖而出&#xff0c;参评的智能坐便…

一起学docker系列之十三使用Dockerfile构建带有Java 8、Vim和Ifconfig功能的CentOS镜像

目录 1 前言2 构建流程3 Dockerfile说明4 解释Dockerfile5 构建Docker镜像6 运行Docker容器7 总结8 参考地址 1 前言 Docker是一个强大的工具&#xff0c;可以创建一致、可移植和隔离的环境。在本指南中&#xff0c;我们将介绍如何创建一个基于CentOS的Docker镜像&#xff0c;…

基于FPGA的五子棋游戏设计

基于FPGA的五子棋游戏设计 本文基于FPGA设计五子棋游戏&#xff0c;使用按键输入&#xff0c;使用VGA接口输出。五子棋的棋具与围棋相同&#xff0c;棋子分为黑白两色&#xff0c;棋盘为1010&#xff0c;棋子放置于棋盘线交叉点上。两人对局&#xff0c;各执一色&#xff0c;轮…

使用docker-compose优雅部署rocketMQ

使用docker-compose优雅部署RocketMQ 随着市场的发展&#xff0c;越来越多的复杂场景出现在我们日常的开发工作中。随之也越来越多的好的工具&#xff0c;也同步出现在程序员的学习范围清单内。好的工具提高产品性能的同时&#xff0c;也带来了很多安装上的问题&#xff0c;do…

31.0/LinkedList/Set/ashSet/ TreeSet/Map/ HashMap/ TreeMap

目录 31.1Linkedlist 31.2Set集合 31.3HashSet集合 31.4添加元素 31.5删除 31.6hashSet的遍历 31.7hashSet的源码 31.8TreeSet集合。 31.1Linkedlist 1.凡是查询源码 &#xff0c;我们都是从类的构造方法入手:/*** Constructs an empty list.*/public LinkedList() {}该…

figma 基础使用——准备阶段

1. 注册账号 2. figma有客户端也有网页端&#xff0c;使用注意同步字体 之后点击下载window installeer 字体 3. 安装 Figma汉化包 通过figma.cool 网站&#xff0c;下载离线的汉化包 之后通过谷歌的扩展程序添加