GitHub Copilot 一键生成中文commit提示语规则设置

GitHub Copilot 一键生成中文commit提示语规则设置

文章目录

0. 前提

安装GitHub Copilot插件

1. 设置提示语规则

setting->Tools->GitHub Copilot->Customizations

在这里插入图片描述

复制以下规则到git-commit-instructions.md

please generate a commit message with Chinese. Make sure it includes an accurate and informative subject line that succinctly summarizes the key points of the changes, the response must only have commit message content and must have blank line in message template. Below is the commit message template: <type>(<scope>): <subject> // blank line <body> // blank line <footer> The Header is mandatory, while the Body and Footer are optional. Regardless of which part, no line should exceed 72 characters (or 100 characters). This is to avoid automatic line breaks affecting aesthetics. Below is the type Enum: - feat: new feature - fix: bug fix - docs: documentation - style: formatting (changes that do not affect code execution) - refactor: refactoring (code changes that are neither new features nor bug fixes) - test: adding tests - chore: changes to the build process or auxiliary tools The body section is a detailed description of this commit and can be split into multiple lines. Here's an example: More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. Further paragraphs come after blank lines. - Bullet points are okay, too - Use a hanging indent 

2. 效果

在这里插入图片描述
以上为个人学习分享,如有问题,欢迎指出:)

Read more

智能指针:告别内存泄漏的利器----《Hello C++ Wrold!》(27)--(C/C++)

智能指针:告别内存泄漏的利器----《Hello C++ Wrold!》(27)--(C/C++)

文章目录 * 前言 * 智能指针的作用 * 智能指针的实现和原理 * 库里面的智能指针 * std::auto_ptr * auto_ptr的模拟实现 * std::unique_ptr * unique_ptr的模拟实现 * std::shared_ptr * shared_ptr的模拟实现 * shared_ptr的一个弊端 * std::weak_ptr * weak_ptr的模拟实现 * 删除定制器 * 作业部分 前言 在 C++ 编程中,动态内存管理始终是开发者面临的核心挑战之一。手动使用new分配内存、delete释放内存的模式,不仅需要开发者时刻关注内存生命周期,更可能因疏忽导致内存泄漏(忘记调用delete)、二次释放(重复调用delete),或是在异常抛出时因执行流跳转跳过delete语句等问题 —— 这些隐患轻则导致程序性能退化,重则引发崩溃或不可预期的运行错误,成为项目中难以排查的 “隐形 bug”。 为解决这一痛点,C++ 标准库引入了智能指针这一核心工具。

By Ne0inhk
【一天一个计算机知识】—— 【 C/C++ 内存管理与分布】

【一天一个计算机知识】—— 【 C/C++ 内存管理与分布】

⚡ CYBER_PROFILE ⚡ /// SYSTEM READY /// [WARNING]: DETECTING HIGH ENERGY 🌊 🌉 🌊 心手合一 · 水到渠成 >>> ACCESS TERMINAL <<<[ 🦾 作者主页 ][ 🔥 C语言核心 ][ 💾 编程百度 ][ 📡 代码仓库 ] --------------------------------------- Running Process: 100% | Latency: 0ms 索引与导读 * 🚩一、C/C++ 内存分布 * 🚩二、C语言的动态内存管理 * 💪C动态内存管理的面试考点 * 1)realloc的工作机制 * 2)malloc/calloc/realloc的区别是什么? * 🚩三、C++ 动态内存管理 * 1)操作内置类型 * 1.1)单个变量的分配和释放

By Ne0inhk
C++有关内存的那些事

C++有关内存的那些事

个人主页:PingdiGuo_guo 收录转栏:C++干货专栏 前言 本篇博客是讲解关于C++内存的一些知识点的。 文章目录 前言 1.内存函数 1.1memcpy函数 1.2memmove函数 1.3 memset函数 2.各数据类型占用 2.1bool类型 2.2char类型 2.3short、int、long类型及整数 2.4float类型及double类型及浮点数 3.学习内存有什么用 总结 1.内存函数 内存函数是在计算机程序中用来操作内存的一类函数。内存函数可以用于分配和释放内存,读取和写入内存中的数据,以及进行内存的复制和移动等操作。 在这里,我们主要介绍几种较为重要的内存函数。 1.1memcpy函数 memcpy函数是C++中的一个标准库函数,用来实现内存拷贝操作。它的原型如下: void

By Ne0inhk
系统学习C++-第二十一讲-用哈希表封装 myunordered_map 和 myunordered_set

系统学习C++-第二十一讲-用哈希表封装 myunordered_map 和 myunordered_set

系统学习C++-第二十一讲-用哈希表封装 myunordered_map 和 myunordered_set * 1. 源码及框架分析 * 2. 模拟实现 unordered_map 和 unordered_set * 2.1 实现出复用哈希表的框架,并支持 insert * 2.2 支持 iterator 的实现 * 2.3 map 支持 ` [] ` * 2.4 unordered_map 和 unordered_set 代码实现 1. 源码及框架分析 SGI-STL30 版本源代码中没有 unordered_map 和 unordered_set ,SGI-STL30 版本是 C+

By Ne0inhk