顺序串算法库构建
学习贺利坚老师顺序串算法库
数据结构之自建算法库——顺序串_创建顺序串s1,创建顺序串s2-CSDN博客
本人详细解析博客
串的概念及操作_串的基本操作-CSDN博客
版本更新日志
V1.0: 在贺利坚老师算法库指导下, 结合本人详细解析博客思路基础上,进行测试, 加入异常弹出信息
v1.0补丁: 完善Error ,合法性检测内部,加入英语提示,并有对应函数标号
V1.0
函数功能:
//(1)将一个字符串数组赋值给顺序串
void Assignment_Sequential_string(Sequential_string &New_String, char Assign_array[]);
//(2) 复制一个串,到另一个串
void Copy_Sequential_String(Sequential_string &accept_string, Sequential_string copy_string);
//(3)判断两个串是否相等
bool Equal_Sequential_String(Sequential_string judge_string1, Sequential_string judge_string2);
//(4)求顺序串串长
int Length_Sequential_String(Sequential_string measure_string);
//(5)串连接
Sequential_string Connect_Sequential_String(Sequential_string link1, Sequential_string link2);
//(6)求子串(从begin_loation开始的number个字符)
Sequential_string Get_Sequential_Substring(Sequential_string substring, int begin_loation, int number);
//(7)插入串(从从begin_loation开始插入字符串,然后组合成新的串)
Sequential_string Insert_Sequential_String(Sequential_string old_string, int begin_loation,Sequential_string insert_string);
//(8)删除串(从begin 开始的number个字符)
Sequential_string Delete_Sequential_String(Sequential_string old_string, int begin_loation,int number);
//(9)串替换(从begin 开始的number个字符)
Sequential_string Replace_Sequential_String(Sequential_string old_string, int begin_loation,int number,Sequential_string new_string);
//(10)输出展示串
void Display_Sequential_String(Sequential_string show_String);
顺序串头函数
Sequential_string.h
#ifndef _SEQUENTIAL_STRING_H_INCLUDE
#define _SEQUENTIAL_STRING_H_INCLUDE#include <stdio.h>
#define MaxSize 100 //最多字符个数//顺序串数据结构
typedef struct
{char Sequential_string_data[MaxSize];//数组串数据int length; //实际串长
}Sequential_string;//(1)将一个字符串数组赋值给顺序串
void Assignment_Sequential_string(Sequential_string &New_String, char Assign_array[]);
//(2) 复制一个串,到另一个串
void Copy_Sequential_String(Sequential_string &accept_string, Sequential_string copy_string);
//(3)判断两个串是否相等
bool Equal_Sequential_String(Sequential_string judge_string1, Sequential_string judge_string2);
//(4)求顺序串串长
int Length_Sequential_String(Sequential_string measure_string);
//(5)串连接
Sequential_string Connect_Sequential_String(Sequential_string link1, Sequential_string link2);
//(6)求子串(从begin_loation开始的number个字符)
Sequential_string Get_Sequential_Substring(Sequential_string substring, int begin_loation, int number);
//(7)插入串(从从begin_loation开始插入字符串,然后组合成新的串)
Sequential_string Insert_Sequential_String(Sequential_string old_string, int begin_loation,Sequential_string insert_string);
//(8)删除串(从begin 开始的number个字符)
Sequential_string Delete_Sequential_String(Sequential_string old_string, int begin_loation,int number);
//(9)串替换(从begin 开始的number个字符)
Sequential_string Replace_Sequential_String(Sequential_string old_string, int begin_loation,int number,Sequential_string new_string);
//(10)输出展示串
void Display_Sequential_String(Sequential_string show_String);
#endif
顺序串库函数
Sequential_string.cpp
#include "Sequential_string.h"/**************************************************
(1)函数名: Assignment_Sequential_string
功 能: 将一个字符串数组赋值给顺序串
参 数: (1)Sequential_string &New_String:创建的新串(2)char Assign_array[]: 原始字符串数组
注 意: 顺序数组,结尾加入'\0'
返回值: 无
**************************************************/
void Assignment_Sequential_string(Sequential_string &New_String, char Assign_array[])
{int counter;for(counter = 0; Assign_array[counter] != '\0'; counter++){New_String.Sequential_string_data[counter] = Assign_array[counter];}New_String.Sequential_string_data[counter] = '\0';New_String.length = counter; //更新串最大位序
}/**************************************************
(2)函数名: Copy_Sequential_String
功 能: 复制一个串,到另一个串
参 数: (1)Sequential_string &accept_string: 复制成的串(2)Sequential_string copy_string:要复制的串
注 意: 复制成的串,传回的是地址,所以不用传回参数
返回值: 无
**************************************************/
void Copy_Sequential_String(Sequential_string &accept_string, Sequential_string copy_string)
{int counter;for(counter = 0; counter < copy_string.length;counter++){accept_string.Sequential_string_data[counter] = copy_string.Sequential_string_data[counter];}accept_string.Sequential_string_data[counter] = '\0';accept_string.length = copy_string.length;
}
/**************************************************
(3)函数名: Equal_Sequential_String
功 能: 判断两个串是否相等
参 数: (1)Sequential_string judge_string1:第一个串(2)Sequential_string judge_string2:第二个串
返回值: bool?是否相等,true:false
**************************************************/
bool Equal_Sequential_String(Sequential_string judge_string1, Sequential_string judge_string2)
{bool same = true;int counter;if(judge_string1.length != judge_string2.length){same = false;}else{for(counter = 0; counter < judge_string1.length;counter++){if(judge_string1.Sequential_string_data[counter] != judge_string2.Sequential_string_data[counter]){same = false;break;}}}return same;}/**************************************************
(4)函数名: Length_Sequential_String
功 能: 求顺序串串长
参 数: Sequential_string measure_string:要进行测量的串
返回值: int:顺序串长度信息
**************************************************/
int Length_Sequential_String(Sequential_string measure_string)
{return measure_string.length;
}/**************************************************
(5)函数名: Connect_Sequential_String
功 能: 把两个串连接成一个串
参 数: Sequential_string link1, Sequential_string link2:两个要链接的串
返回值: 返回Sequential_string Connection_string: 链接成的串
**************************************************/
Sequential_string Connect_Sequential_String(Sequential_string link1, Sequential_string link2)
{Sequential_string Connection_string;int counter;Connection_string.length = link1.length + link2.length;//将第一个串加入链接的串for(counter = 0; counter < link1.length; counter++){Connection_string.Sequential_string_data[counter] = link1.Sequential_string_data[counter];}//将第二个串加入链接的串for(counter = 0; counter < link2.length; counter++){Connection_string.Sequential_string_data[link1.length+counter] = link2.Sequential_string_data[counter];}Connection_string.Sequential_string_data[link1.length+counter] = '\0';return Connection_string;
}/**************************************************
(6)函数名: Get_Sequential_Substring
功 能: 求子串(从begin_loation开始的number个字符)
参 数: (1)Sequential_string mother_String:母串(2)int begin_loation:开始分割子串的位置(3)int number:子串的数量
返回值: Sequential_string son_String:得到的子串
**************************************************/
Sequential_string Get_Sequential_Substring(Sequential_string mother_String, int begin_loation, int number)
{Sequential_string son_String;int counter;son_String.length = 0;if(begin_loation <= 0 || begin_loation > mother_String.length || number < 0 || begin_loation+number-1>mother_String.length){//错误:分割的子字符串的位置错误。printf("\nError<6>:The position of the divided substring is wrong.\n");return son_String; // 参数不正确返回空串}for(counter = begin_loation-1; counter < begin_loation+number-1; counter++){son_String.Sequential_string_data[counter-begin_loation+1] = mother_String.Sequential_string_data[counter];}son_String.Sequential_string_data[counter-begin_loation+1] = '\0';son_String.length = number;return son_String;
}/**************************************************
(7)函数名: Insert_Sequential_String
功 能: 插入串(从从begin_loation开始插入字符串,然后组合成新的串)
参 数: (1)Sequential_string old_string:在原始串的基础上插入(2)int begin_loation: 插入的位置(3)Sequential_string insert_string:插入的新串
思 路: 在原有串的基础上,割开一个口子,放上新串,然后组合成新串
返回值: Sequential_string form_string:组合成的新串
**************************************************/
Sequential_string Insert_Sequential_String(Sequential_string old_string, int begin_loation,Sequential_string insert_string)
{int counter;Sequential_string form_string;form_string.length = 0;//参数不正确, 返回空串if(begin_loation <= 0 || begin_loation > old_string.length+1){//错误:插入位置错误printf("\nError<7>: wrong insertion position.\n");return form_string;}for(counter = 0; counter < begin_loation-1;counter++){form_string.Sequential_string_data[counter] = old_string.Sequential_string_data[counter];}for(counter = 0; counter < insert_string.length;counter++){form_string.Sequential_string_data[begin_loation-1+counter] = insert_string.Sequential_string_data[counter];}for(counter = begin_loation-1; counter<old_string.length;counter++){form_string.Sequential_string_data[insert_string.length+counter] = old_string.Sequential_string_data[counter];}form_string.Sequential_string_data[insert_string.length+counter] = '\0';form_string.length = old_string.length + insert_string.length;return form_string;}
/**************************************************
(8)函数名: Delete_Sequential_String
功 能: 删除串(从begin 开始的number个字符)
参 数: (1)Sequential_string old_string:在原有串的基础上删除(2)int begin_loation: 开始删除的位置(从逻辑1开始)(3)int number:删除的数量
注 意: 要判断删除的位置和数量是否正确
返回值:Sequential_string new_string:删除完后的新串
**************************************************/
Sequential_string Delete_Sequential_String(Sequential_string old_string, int begin_loation,int number)
{int counter;//定义计数器Sequential_string new_string;new_string.length = 0;//合法性判断(begin_loation理应从1开始到leng长度)if(begin_loation <= 0 || begin_loation > old_string.length || (begin_loation+number-1) > old_string.length){//错误:删除的位置或数量错误。printf("Error<8>: Wrong location or quantity of deletion.");return new_string;//返回空串}//择出删除位置之前的串for(counter = 0; counter < begin_loation-1;counter++){new_string.Sequential_string_data[counter] = old_string.Sequential_string_data[counter];}//择出删除位置之后的串for(counter = begin_loation+number-1; counter < old_string.length; counter++){new_string.Sequential_string_data[counter-number] = old_string.Sequential_string_data[counter];}new_string.Sequential_string_data[counter-number] = '\0';new_string.length = old_string.length - number;return new_string;
}/**************************************************
(9)函数名: Replace_Sequential_String
功 能: 串替换(从begin 开始的number个字符)
参 数: (1)Sequential_string old_string:原始串(2)int begin_loation:开始替换的位置(3)int number:替换的字符个数(4)Sequential_string replace_string:要替换成的字符串
思 路: 锁定old_string从begin_loation开始的number个字符,然后开始剪切建立新串,①把begin_loation之前的字符加入新串,②要替换成的串加入,③锁定后的字符加入④组合成新串,返回传出
注 意: 最后加'\0'
返回值: Sequential_string new_string:替换后,产生的新串
**************************************************/
Sequential_string Replace_Sequential_String(Sequential_string old_string, int begin_loation,int number,Sequential_string replace_string)
{int counter;Sequential_string new_string;new_string.length = 0;//合法性判断if(begin_loation <= 0 || begin_loation > old_string.length || begin_loation+number-1>old_string.length){//错误:要替换位置出现错误printf("\nError<9>: There is an error in the position to be replaced.\n");return new_string;//返回空串}//开始复制剪切for(counter = 0; counter < begin_loation-1; counter++){new_string.Sequential_string_data[counter] = old_string.Sequential_string_data[counter];}//加入要替换的串for(counter = 0; counter < replace_string.length; counter++){new_string.Sequential_string_data[begin_loation-1+counter] = replace_string.Sequential_string_data[counter];}//被替换位置,后面剩余的串for(counter = begin_loation+number-1; counter < old_string.length; counter++){new_string.Sequential_string_data[counter-number+replace_string.length] = old_string.Sequential_string_data[counter];}new_string.Sequential_string_data[counter-number+replace_string.length] = '\0';new_string.length = old_string.length - number + replace_string.length;return new_string;
}/**************************************************
(10)函数名: Display_Sequential_String
功 能: 输出展示串
参 数: Sequential_string show_String:要输出展示的串
注 意: 字符串后续可以换成自定义类型
返回值: 无
**************************************************/
void Display_Sequential_String(Sequential_string show_String)
{int counter;if(show_String.length > 0){for(counter = 0; counter < show_String.length; counter++){printf("%c", show_String.Sequential_string_data[counter]);}printf("\n");}
}
main函数测试 1:
范围正常情况下测试:
主函数文件名字
main.cpp
#include <stdio.h>
#include "Sequential_string.h"int main()
{Sequential_string test_string,test_string1,test_string2,test_string3,test_string4;char test_char1[ ] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','\0'};char test_char2[] = {'1','2','3','\0'};printf("\n顺序串的基本运算如下:\n");printf("\n(1)建立串test_string和test_string1\n");Assignment_Sequential_string(test_string, test_char1);printf("\n(2)输出串test_string:\n");Display_Sequential_String(test_string);Assignment_Sequential_string(test_string1, test_char2);printf("\n(2)输出串test_string1:\n");Display_Sequential_String(test_string1);printf("\n(3)串test_string的长度是:%d\n",Length_Sequential_String(test_string));printf("\n(4)在串test_string的第9个字符位置插入串test_string1,从而产生test_string2\n");test_string2 = Insert_Sequential_String(test_string,9,test_string1);printf("\n(5)输出串test_string2:\n");Display_Sequential_String(test_string2);printf("\n(6)删除串test_string2第2个字符开始的五个字符,而产生串2\n");test_string2 = Delete_Sequential_String(test_string2,2,5);printf("\n(7)输出串test_string2:\n");Display_Sequential_String(test_string2);printf("\n(8)将串2第二个字符开始的5个字符替换成串1,从而产生串2\n");test_string2 = Replace_Sequential_String(test_string2,2,5,test_string1);printf("\n(9)输出串2\n");Display_Sequential_String(test_string2);printf("\n(10)提取串2的第二个字符开始的5个字符而产生串3\n");test_string3 = Get_Sequential_Substring(test_string2,2,5);printf("\n(11)输出串3\n");Display_Sequential_String(test_string3);printf("\n(12)将串2和串3链接起来,而产生串4\n");test_string4 = Connect_Sequential_String(test_string2,test_string3);printf("\n(13)输出串4\n");Display_Sequential_String(test_string4);return 0;
}
运行结果展示:
main函数测试 2:
范围超出情况下测试:
主函数文件名字
main.cpp
#include <stdio.h>
#include "Sequential_string.h"int main()
{Sequential_string test_string,test_string1,test_string2,test_string3,test_string4;char test_char1[ ] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','\0'};char test_char2[] = {'1','2','3','\0'};printf("\n顺序串的基本运算如下:\n");printf("\n(1)建立串test_string和test_string1\n");Assignment_Sequential_string(test_string, test_char1);printf("\n(2)输出串test_string:\n");Display_Sequential_String(test_string);Assignment_Sequential_string(test_string1, test_char2);printf("\n(2)输出串test_string1:\n");Display_Sequential_String(test_string1);printf("\n(3)串test_string的长度是:%d\n",Length_Sequential_String(test_string));printf("\n(4)在串test_string的第100个字符位置插入串test_string1,从而产生test_string2\n");test_string2 = Insert_Sequential_String(test_string,100,test_string1);printf("\n(5)输出串test_string2:\n");Display_Sequential_String(test_string2);printf("\n(6)删除串test_string2第99个字符开始的五个字符,而产生串2\n");test_string2 = Delete_Sequential_String(test_string2,99,5);printf("\n(7)输出串test_string2:\n");Display_Sequential_String(test_string2);printf("\n(8)将串2第88个字符开始的5个字符替换成串1,从而产生串2\n");test_string2 = Replace_Sequential_String(test_string2,88,5,test_string1);printf("\n(9)输出串2\n");Display_Sequential_String(test_string2);printf("\n(10)提取串2的第33个字符开始的5个字符而产生串3\n");test_string3 = Get_Sequential_Substring(test_string2,33,5);printf("\n(11)输出串3\n");Display_Sequential_String(test_string3);printf("\n(12)将串2和串3链接起来,而产生串4\n");test_string4 = Connect_Sequential_String(test_string2,test_string3);printf("\n(13)输出串4\n");Display_Sequential_String(test_string4);return 0;
}
运行结果展示:
相关文章:

顺序串算法库构建
学习贺利坚老师顺序串算法库 数据结构之自建算法库——顺序串_创建顺序串s1,创建顺序串s2-CSDN博客 本人详细解析博客 串的概念及操作_串的基本操作-CSDN博客 版本更新日志 V1.0: 在贺利坚老师算法库指导下, 结合本人详细解析博客思路基础上,进行测试, 加入异常弹出信息 v1.0补…...

[论文阅读笔记33] Matching Anything by Segmenting Anything (CVPR2024 highlight)
这篇文章借助SAM模型强大的泛化性,在任意域上进行任意的多目标跟踪,而无需任何额外的标注。 其核心思想就是在训练的过程中,利用strong augmentation对一张图片进行变换,然后用SAM分割出其中的对象,因此可以找到一组图…...

阿里Nacos下载、安装(保姆篇)
文章目录 Nacos下载版本选择Nacos安装Windows常见问题解决 更多相关内容可查看 Nacos下载 Nacos官方下载地址:https://github.com/alibaba/nacos/releases 码云拉取(如果国外较慢或者拉取超时可以试一下国内地址) //国外 git clone https:…...

四、golang基础之defer
文章目录 一、定义二、作用三、结果四、recover错误拦截 一、定义 defer语句被用于预定对一个函数的调用。可以把这类被defer语句调用的函数称为延迟函数。 二、作用 释放占用的资源捕捉处理异常输出日志 三、结果 如果一个函数中有多个defer语句,它们会以LIFO…...

机器人----四元素
四元素 四元素的大小 [-1,1] 欧拉角转四元素...

IBM Spectrum LSF Application Center 提供单一界面来管理应用程序、用户、资源和数据
IBM Spectrum LSF Application Center 提供单一界面来管理应用程序、用户、资源和数据 亮点 ● 简化应用程序管理 ● 提高您的工作效率 ● 降低资源管理的复杂性 ● 深入了解流程 IBM Spectrum LSF Application Center 为集群用户和管理员提供了一个灵活的、以应用为中心的界…...

如何选择品牌推广公司?哪家好?收费标准及评价!
不管是什么品牌,推广对公司的成败起了很关键的作用。然而,面对市面上琳琅满目的品牌推广公司,如何选择一家既熟悉又靠谱的公司,成为许多企业主面临的难题。 作为一家手工酸奶品牌的创始人,目前全国也复制了100多家门店…...

JDeveloper 12C 官网下载教程
首先、我们要登录Oracle官网 Oracle 甲骨文中国 | 云应用和云平台 登录进去如果不是中文可以点击右上角带有国旗的图标就行更改,选择一个你能看懂的文字。 然后,点击“资源”—点击“开发人员下载” 然后,点击“开发工具” 这里有很多工具可…...

中英双语介绍美国的州:印第安纳州(Indiana)
中文版 印第安纳州简介 印第安纳州位于美国中西部地区,是一个以其农业、制造业和体育文化而著称的州。以下是对印第安纳州的详细介绍,包括其地理位置、人口、经济、教育、文化和主要城市。 地理位置 印第安纳州东临俄亥俄州,北接密歇根州…...

Flink实现准确和高效流处理的关键问题
时间相关: Watermark 水位线 水位线是插入到数据流中的一个标记,可以认为是一个特殊的数据。水位线主要的内容是一个时间戳,用来表示当前事件时间的进展。水位线是基于数据的时间戳生成的。水位线的时间戳必须单调递增,以确保任务的事件时间时钟一直向前推进,进展。水位线…...

isidentifier()方法——判断字符串是否为合法的Python标识符或变量名
自学python如何成为大佬(目录):https://blog.csdn.net/weixin_67859959/article/details/139049996?spm1001.2014.3001.5501 语法参考 isidentifier()方法用于判断字符串是否是有效的Python标识符,还可以用来判断变量名是否合法。isidentifier()方法的语法格式如…...

天猫商品列表数据接口(Tmall.item_search)
天猫平台商品列表数据接口(taobao.item_search)是天猫开放平台提供的一个API接口,用于获取天猫平台上的商品列表数据。通过该接口,用户可以获取到商品的名称、价格、销量、评价等信息。下面将具体介绍这个接口的各个方面ÿ…...

React+TS前台项目实战(二十一)-- Search业务组件封装实现全局搜索
文章目录 前言一、Search组件封装1. 效果展示2. 功能分析3. 代码详细注释4. 使用方式 二、搜索结果展示组件封装1. 功能分析2. 代码详细注释 三、引用到文件,自行取用总结 前言 今天,我们来封装一个业务灵巧的组件,它集成了全局搜索和展示搜…...

SEO与AI的结合:如何用ChatGPT生成符合搜索引擎优化的内容
在当今数字时代,搜索引擎优化(SEO)已成为每个网站和内容创作者都必须掌握的一项技能。SEO的主要目标是通过优化内容,使其在搜索引擎结果页面(SERP)中排名更高,从而吸引更多的流量。然而…...

【信息系统项目管理师知识点速记】组织通用管理:知识管理
23.3 知识管理 23.3.1 知识管理基础 知识管理是通过利用各种知识和技术手段,帮助组织和个人生产、分享、应用和创新知识,以形成知识优势并在个人、组织、业务目标、经济绩效和社会效益方面产生价值的过程。它能为组织带来知识增值,创造新的价值,提升决策效能和水平,是提…...

CM-UNet: Hybrid CNN-Mamba UNet for Remote Sensing Image Semantic Segmentation
论文:CM-UNet: Hybrid :CNN-Mamba UNet for Remote Sensing Image Semantic Segmentation 代码:https://github.com/XiaoBuL/CM-UNet Abstrcat: 由于大规模图像尺寸和对象变化,当前基于 CNN 和 Transformer 的遥感图像语义分割方…...

DP:子序列问题
文章目录 什么是子序列子序列的特点举例说明常见问题 关于子序列问题的几个例题1.最长递增子序列2.摆动序列3.最长递增子序列的个数4.最长数对链5.最长定差子序列 总结 什么是子序列 在计算机科学和数学中,子序列(Subsequence)是指从一个序列…...

Spring Data与多数据源配置
Spring Data与多数据源配置 大家好,我是免费搭建查券返利机器人省钱赚佣金就用微赚淘客系统3.0的小编,也是冬天不穿秋裤,天冷也要风度的程序猿!今天我们来探讨如何在Spring Data中配置和使用多个数据源。 在现代应用程序中&…...

【前端vue3】TypeScrip-类型推论和类型别名
类型推论 TypeScript里,在有些没有明确指出类型的地方,类型推论会帮助提供类型。 例如: 变量xiaoc被推断类型为string 如重新给xiaoc赋值数字会报错 let xiaoc "xiaoc"xiaoc 1111111111111如没有给变量指定类型和赋值…...

javaEE——Servlet
1.web开发概述 所谓web开发,指的是从网页中向后端程序发送请求,与后端程序进行交互 2.java后端开发环境搭建 web后端(javaEE)程序需要运行在服务器中的,这样前端才可以访问得到 3.服务器是什么? ①服务器就是一款软件,可以向其发送请求&#…...

Kotlin扩展函数(also apply run let)和with函数
also apply run let with的使用例子 private fun testOperator() {/*** also*/val person Person("ZhangSan", 18)person.also {// 通常仅仅打印使用, 也可以通过it修改it.name "ZhangSan1"println("also inner name: " it.name)}println(&qu…...

C语言笔记27 •单链表介绍•
1.链表的概念及结构 链表是⼀种物理存储结构上非连续、非顺序的存储结构,数据元素的逻辑顺序是通过链表 中的指针链接次序实现的。 2. 顺序表带来的问题 (1)中间/头部的插⼊删除,时间复杂度为O(N) (2)增容需要申请新空间,拷⻉数据ÿ…...

C++编程(五)单例模式 友元
文章目录 一、单例模式(一)概念(二)实现方式1. 饿汉式2. 懒汉式 二、友元(一)概念(二)友元函数1.概念2.语法格式3. 使用示例访问静态成员变量访问非静态成员变量 (三&…...

012-GeoGebra基础篇-构造圆的切线
前边文章对于基础内容已经悉数覆盖了,这一篇我就不放具体的细节,若有需要可以复刻一下 目录 一、成品展示二、算式内容三、正确性检查五、文章最后 一、成品展示 二、算式内容 A(0,0) B(3,0) c: Circle(A,B) C(5,4) sSegment(A,C) DMidpoint(s) d: Circ…...

数据结构速成--查找
由于是速成专题,因此内容不会十分全面,只会涵盖考试重点,各学校课程要求不同 ,大家可以按照考纲复习,不全面的内容,可以看一下小编主页数据结构初阶的内容,找到对应专题详细学习一下。 目录 …...

SpringMVC的基本使用
SpringMVC简介 SpringMVC是Spring提供的一套建立在Servlet基础上,基于MVC模式的web解决方案 SpringMVC核心组件 DispatcherServlet:前置控制器,来自客户端的所有请求都经由DispatcherServlet进行处理和分发Handler:处理器&…...

【PYG】Cora数据集分类任务计算损失,cross_entropy为什么不能直接替换成mse_loss
cross_entropy计算误差方式,输入向量z为[1,2,3],预测y为[1],选择数为2,计算出一大坨e的式子为3.405,再用-23.405计算得到1.405MSE计算误差方式,输入z为[1,2,3],预测向量应该是[1,0,0]࿰…...

MyBatis-plus这么好用,不允许还有人不会
你好呀,我是 javapub. 做 Java 的同学都会用到的三件套,Spring、SpringMV、MyBatis。但是由于使用起来配置较多,依赖冲突频发。所有,各路大佬又在这上边做了包装,像我们常用的 SpringBoot、MyBatisPlus。 基于当前要…...

Linux驱动开发实战宝典:设备模型、模块编程、I2C/SPI/USB外设精讲
摘要: 本文将带你走进 Linux 驱动开发的世界,从设备驱动模型、内核模块开发基础开始,逐步深入 I2C、SPI、USB 等常用外设的驱动编写,结合实际案例,助你掌握 Linux 驱动开发技能。 关键词: Linux 驱动,设备驱动模型,内核模块,I2C,SPI,USB 一、Linux 设备驱动模型 Li…...

安全技术和防火墙
1、安全技术 1.1入侵检测系统 特点是不阻断网络访问,主要提供报警和事后监督。不主动介入,默默的看着你(类似于监控) 1.2入侵防御系统 透明模式工作, 数据包,网络监控,服务攻击,…...