This commit is contained in:
2025-08-23 15:15:57 +08:00
commit b5fbaa9db5
167 changed files with 2087 additions and 0 deletions

11
.obsidian/app.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"promptDelete": false,
"readableLineLength": false,
"showLineNumber": false,
"pdfExportSettings": {
"pageSize": "Letter",
"landscape": false,
"margin": "0",
"downscalePercent": 100
}
}

4
.obsidian/appearance.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"accentColor": "",
"baseFontSize": 17
}

30
.obsidian/core-plugins-migration.json vendored Normal file
View File

@ -0,0 +1,30 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false
}

33
.obsidian/core-plugins.json vendored Normal file
View File

@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false,
"webviewer": false,
"footnotes": false,
"bases": true
}

22
.obsidian/graph.json vendored Normal file
View File

@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}

234
.obsidian/workspace.json vendored Normal file
View File

@ -0,0 +1,234 @@
{
"main": {
"id": "1bd807fe88ca9c64",
"type": "split",
"children": [
{
"id": "ef2347a8bf0ceb3e",
"type": "tabs",
"children": [
{
"id": "bbf91c3bb75b1c93",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "笔记/虚拟机.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "虚拟机"
}
},
{
"id": "e9cad7149d0fefbb",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "2025-08-18.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "2025-08-18"
}
}
],
"currentTab": 1
}
],
"direction": "vertical"
},
"left": {
"id": "217021656a2d4ef1",
"type": "split",
"children": [
{
"id": "e02fff6c919759d7",
"type": "tabs",
"children": [
{
"id": "e525954af0620c48",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "byCreatedTimeReverse",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "文件列表"
}
},
{
"id": "62dd24b8a8a70ab7",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "搜索"
}
},
{
"id": "9b362e25f8ed6774",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "书签"
}
}
]
}
],
"direction": "horizontal",
"width": 200
},
"right": {
"id": "13b77209034da81b",
"type": "split",
"children": [
{
"id": "352dc70db312daae",
"type": "tabs",
"children": [
{
"id": "5ba8111adcdcfb3e",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "笔记/C++.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "C++ 的反向链接列表"
}
},
{
"id": "728bc10f6e28d4b5",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "笔记/GitHub.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "GitHub 的出链列表"
}
},
{
"id": "60bfefdbf806c829",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true
},
"icon": "lucide-tags",
"title": "标签"
}
},
{
"id": "557e1a76595e2bd2",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "2025-08-18.md",
"followCursor": true,
"showSearch": true,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "2025-08-18 的大纲"
}
}
],
"currentTab": 3
}
],
"direction": "horizontal",
"width": 200
},
"left-ribbon": {
"hiddenItems": {
"bases:创建新数据库": false,
"switcher:打开快速切换": false,
"graph:查看关系图谱": false,
"canvas:新建白板": false,
"daily-notes:打开/创建今天的日记": false,
"templates:插入模板": false,
"command-palette:打开命令面板": false
}
},
"active": "e9cad7149d0fefbb",
"lastOpenFiles": [
"未命名 2.base",
"Linux.md",
"未命名 1.base",
"未命名.base",
"调试指令/高轨dg终端入网.md",
"2025-08-18.md",
"boost.md",
"笔记/虚拟机.md",
"笔记/C++.md",
"串口.md",
"开启网口.md",
"rbnet.ko 模块.md",
"红黑隔离测试.md",
"密态入网.md",
"笔记/CMakeLists-Qt.md",
"调试指令/AP.md",
"调试指令/CP.md",
"调试指令/AT指令.md",
"调试指令/891入网AT指令.md",
"操作指南.md",
"笔记/CMakeLists.md",
"Pasted image 20250528144119.png",
"Pasted image 20250528144112.png",
"未命名.canvas",
"2025-08-01.md",
"任务/XW测试任务.md",
"调试指令",
"日志读取小程序/未命名 1.md",
"项目/HH态CP控制小程序.md",
"项目",
"笔记/QT.md",
"任务/图片",
"任务",
"笔记/GitHub.md",
"func.md",
"Pasted image 20250213171955.png",
"Pasted image 20250213092216.png",
"Pasted image 20250213094931.png",
"~$第5章(3课时已更新.ppt",
"~$第2章(2课时已更新.ppt",
"笔记",
"QT/图片/7941646ae9f8aeb7212bf21961ac0b79_.png",
"QT/图片/ce35786fa07e588a9538c0dad8daf521_.png",
"QT/图片/016cf2ec99554101094703fbf2d0c6ee_.png",
"QT/图片/298e44ff81e6f5da424ed5794b746193_.png",
"QT/图片/9880bbadba9f47a4f5ea039bf6a5c589_.png"
]
}

28
2025-08-18.md Normal file
View File

@ -0,0 +1,28 @@
石家庄西区高轨在轨测试
cp版本v1.5
发送AT指令
AT^PSTM=4
AT^STOREFREQXW=1,1610016,0
at+cfun=1
频谱仪无法使用,将下行接到原型机上,原型机显示有信号
7E 00 46
83
20 02 00 00
35 01 00
34 07 00 2A DD 0C CC 00 00
5A 02 00 00
52 02 00 05
53 02 00 05
54 02 00 28
55 02 02 EE
56 04 00 00 00 0A
09 01 01
0B 01 05
46 07 4C 4C 01 0B 01 0B 1E
47 01 72
48 01 3F
49 01 73
4A 01 3F
ED 7E

29
C/cmath.md Normal file
View File

@ -0,0 +1,29 @@
#include "cmath"
基础数学运算
sqrt(x): 计算 x 的平方根。
pow(x, y): 计算 x 的 y 次幂。
exp(x): 计算 e 的 x 次幂 (e 是自然对数的底)。
log(x): 计算 x 的自然对数。
log10(x): 计算 x 的以 10 为底的对数。
三角函数
sin(x): 计算 x 弧度的正弦值。
cos(x): 计算 x 弧度的余弦值。
tan(x): 计算 x 弧度的正切值。
asin(x): 计算 x 的反正弦值,结果在 -pi/2 到 pi/2 弧度范围内。
acos(x): 计算 x 的反余弦值,结果在 0 到 pi 弧度范围内。
atan(x): 计算 x 的反正切值,结果在 -pi/2 到 pi/2 弧度范围内。
双曲函数
sinh(x): 计算 x 的双曲正弦值。
cosh(x): 计算 x 的双曲余弦值。
tanh(x): 计算 x 的双曲正切值。
取整和舍入
floor(x): 返回不大于 x 的最大整数。
ceil(x): 返回不小于 x 的最小整数。
round(x): 四舍五入到最近的整数。
trunc(x): 舍去 x 的小数部分,返回整数部分。
绝对值与符号
abs(x): 计算 x 的绝对值。对于整型和浮点型有不同的重载版本。
copysign(x, y): 返回 x 的值但带有 y 的符号。
其他
fmod(x, y): 计算 x 除以 y 的浮点余数。
modf(x, &intpart): 将 x 分解为整数和小数部分,整数部分通过指针返回。

5
C/代码.md Normal file
View File

@ -0,0 +1,5 @@
`system("chcp 65001")`
`setbuf(stdout, NULL)` 解决Clion内置控制台debug时不显示打印的问题
`QT_ASSUME_STDERR_HAS_CONSOLE=1` Clion调试显示qDebug
在对应目录下
`windeployqt ${NAME}` 生成所需库

13
C/叫号系统.md Normal file
View File

@ -0,0 +1,13 @@
简化版:排队叫号系统=1天
功能1取号
取号:新客户到现场,输入姓名,生成号码并显示排队信息:排队号,姓名,当前号码前面等待人数。
号码生成:
排队号码一位字母A+3位数字。例如A001。每次客户取号递增1。
功能2叫号
银行工作人员选择叫号,显示当前待办客户的排队号、排队总人数。
如果客户未到工作人员再次叫号总共3次机会3次之后呼叫下一位客户。
功能3取消排队
某位客户可以取消自己的排队。取消排队后,在叫号时就不再呼叫该客户。
功能4
显示当前排队情况:当前正在排队的人数,排队信息(每个人的姓名)

0
C/快捷键.md Normal file
View File

70
C/指针练习.md Normal file
View File

@ -0,0 +1,70 @@
1.指针-判定子串
编写一个程序,判定一个字符串是否是另一个字符串的子串,若是,则返回子串在主串中的位置。要求不能使用系统函数。
2.指针-删除字符
编写一个函数删除一个字符串中的指定字符函数原型Void delStr(char str,char ch)
3.指针-数组移动元素
编写一个程序, 输入一个整形数组array将该数组的最后一个元素移到第0个位置其它元素后移一个位置。在main中将该数组输出。不要定义辅助数组。
4.指针-数组交换元素
从键盘上输入10个整数存放到一维数组中将其中最小的数与第一个数对换最大的数与最后一个数对换。要求进行数据交换的处理过程编写成一个函数函数中对数据的处理要用指针方法实现。输入数据为35,20,94-23,39-56,100,87,49,12.
5.指针-移动字符串内容
编写一个函数函数的功能是移动字符串中的内容。移动的规则如下把第1到第m个字符平移到字符串的最后再把第m+1到最后的字符移动到字符串的前部。例如字符串中原由的内容为ABCDEFGHIJKm的值为3则移动后字符串中的内容应该是DEFGHIJKABC。在主函数中输入一个长度不大于20的字符串和平移的值m调用函数完成字符串的平移。要求用指针方法处理字符串。
6.指针-字符串复制
输入一个长度不大于30的字符串将此字符串中从第m个字符开始的剩余全部字符复制成为另一个字符串并将这个新字符串输出。要求用指针方法处理字符串。
7.数组或指针-移动元素
将一个5x5的矩阵中最大的元素放在中心,4个角分别放4个最小的元素(顺序为从左到右,从上到下依次从小到大存放),写一函数实现之。用main函数调用
8.指针-复制部分字符串
有一个字符串包含n个字符。写一函数将此字符串中从第m个字符开始的全部字符复制成为另一个字符串复制操作在子函数中实现并用指针传递
9.数组和指针-排序
编写一个程序在主函数中建立数组并输入n个数调用自定义函数对这n个数进行排序然后显示排序的结果。要求用指针作为函数参数进行传递
10.指针-查找集合中的字符
请编写函数,在一个字符串中进行搜索,查找所有在一个给定字符集合中出现的字符。
接口如下: char find_char (char const source, char const * chars)
例如souce = “ABCDEF”, chars = "XYZ"或者"JURY"就返回NULL
如果chars = “XRCQEF” 返回指向C字符的指针
11.指针-删除子串
编写函数删除字符串的一部分如果substr是str的子串就删除掉str中substr部分
例如str = “ABCDEFG” substr=“CDE” 那么删除后str="ABFG"并且函数返回1
如果不是子串就不修改str函数返回-1
int del_substr(char str, char const substr)
12.指针-字符替换
编制一个字符替换函数实现将已知字符串str中所有ch指定的字符都用ch2指定的字符代替。函数原型void replace (char str,char ch,char ch2)
13.指针-比较字符串
自己编写一个函数比较两个字符串是否相等函数原型为int Compare (char str1, char str2)
14***.指针-使用指针判断回文数***
一个正数如果顺着和反过来都是一样的比如12321反过来也是12321那么就称为回文数。回文数不能以0开头回文数从1开始。使用指针实现回文数判断。
15.指针-找出最大的字符串
用指针法编程从键盘上输入多个字符串每个串不超过5个字符且没有空格用””作为输入结束的标记。从所输入的若干字符串中找出一个最大的串并输出该串。要求串的输入以及最大串的查找通过调用编写的函数实现。
16.数组-报数出圈
有n个人围成一圈顺序排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来第几号的那位。
17.数组-使用函数输出一个整数的逆序数
18.循环或递归-皮球掉落
皮球从某给定高度自由落下触地后反弹到原高度的一半再落下再反弹……如此反复。问皮球在第n次落地时在空中一共经过多少距离第n次反弹的高度是多少
19.指针-指向函数的指针
用函数和指针完成下述程序功能有两个整数a和b由用户输入1,2或3。如输入1程序就给出a和b中大者输入2就给出a和b中小者输入3则求a与b之和。
练习20.1
输入一个整数n定义一个长度为n的动态数组输入n个数字输出这n个数中仅出现一次的数。
例如:输入 12 36 72 36 87 99 87 12 35 12
输出 72 99 35
练习20.2
输入一个整数n定义一个长度为n的动态数组输入n个数字去掉其中最大的2个数和最小的2个数求剩余数据的平均值

61
C/练习3.md Normal file
View File

@ -0,0 +1,61 @@
练习4-1
某种聊天工具每个好友的id都是唯一的当用户接收到信息后如果会话窗口之前没有与该好友的聊天信息则在通信列表里会将新
接收的消息的好友id置顶如果会话窗口中已有与该好友的聊天信息则将该好友的id移动到通讯列表的顶端。请根据要求实现该功能。
输入:第一行为整数N代表有N组测试数据接下来的N组测试中第一行为整数T代表有T条通讯第二行有T个整数按时间先后顺序表示接收到讯息的好友id。
输出:按照通讯列表从上到下的顺序输出好友id每个id以空格分隔。
注:只支持一组测试数据即可。
样例输入: 样例输出:
![[3a02555e24cab50917acb282f461237.png]]![[7a0aa8773d0a7158d0f5105b1af598d.png]]
练习4-3
有两组数据分别是{10,15,2,8,22,11}、{1,5,10,22,4,8,33,6}将这两组数据分别存储在list容器中并将两个链表合并合并之后删除重复
元素,对链表中的值从小到大排序。
练习4-6
假设一个算术表达式中可以包含三种符号:圆括号“(”和“)”、方括号“[”
和“]”、花括号“{”和“}”,且这三种括号可按任意次序嵌套使用。编写判别
给定表达式中所含的括号是否正确配对的算法
练习6-2set
现有n个正整数要求出这n个正整数中的第k个最小整数(相同大小的整数只计算一次)。
练习7-1set
计算集合的并。结果不能有重复元素。
![[0bb15f78462e86158422796120dc207.png]]![[f59eac4e6d3133f2f5858a8acb8686c.png]]
练习5-2map
按字典序统计下面这段文字中单词出现的次数
It was the best of times, and it was the worst of times. It was the age of wisdom, and it was the age of foolishness. It was the epoch of belief, and it was the epoch of incredulity. It was the season of light, and it was the season of darkness. It was the spring of hope, and it was the winter of despair. We had everything before us, and we had nothing before us. We were all going direct to Heaven, and we were all going direct the other way. In short, the period was so far like the present period. That some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only.
练习7-2multimap或map嵌套
小A经营着一个不大的水果店。他认为生存之道就是经营最受顾客欢迎的水果。现在他想要一份水果销售情况的明细表这样就可以很容易掌握所有水果的销售情况了。小A告诉你每一笔销售记录的水果名称产地和销售的数量请你帮他生成明细表。
![[6be0838f13e72aec326d619f0b71332.png]]![[2b156b84355b2f971688672c938db99.png]]
练习5-1容器vector、排序、插入、删除
杰克船长挖掘到一个宝藏,里面有各种各样的财宝,每种财宝一堆,杰克船长打算每次将两堆财宝合并,直到将这些财宝合并为一堆,显
经过n-1次合并之后财宝会成为1堆假定消耗的体力为两堆财宝的重量之和为了将这批宝藏搬运到船上杰克船长必须保证合并
时花费的体力最少,你的任务是设计合并方案,计算出最小的体力消耗值。
输入:第一行一个整数N表示有N组测试数据
接下来的N组测试数据第一行整数M表示有M种财宝下一行包括M个整数表示每种财宝的重量。
输出:消耗的最小体力值
![[12407f4de1c3a66578d2e8f82d4c51f.png]]![[d51e2d4d5194acd69a2d21ea46db3fd.png]]![[2573882d9beaa8ae813e1dc759981b1.png]]
练习8-1栈和数组
小A在纸上写了一个串只包含(和 )’。一个’(能唯一匹配一个’),但是一个匹配的’(必须出现在')之前。请判断小A写的字符
串能否括号完全匹配,如果能,输出配对的括号的位置(匹配的括号不可以交叉,只能嵌套)。
![[b81c8e32fb279b599b41bb069fde712.png]]![[498a6e3e108ad1ba52f6c84f6b00815.png]]
练习8-2栈和双端队列deque
小A每天都在用一款名为“小A浏览器”的软件。在这个浏览器中一共三种操作:打开页面、回退和前进。它们的功能如下:
打开页面:在地址栏中输入网址,并跳转到网址对应的页面;
回退:返回到上一次访问的页面;
前进:返回到上次回退前的页面,如果上一次操作是打开页面,那么将无法前进。
现在小A打开浏览器进行了一系列操作你需要输出他每次操作后所在页面的网址。
![[7ae7b55e7def6eb5bad45d7ad6f01c9.png]]![[2e672494682fd2377a55eadc65f4040.png]]
练习4-2最后练
在一项比赛中有五位参赛选手分别是A、B、C、D、E设计一个Player类数据成员包括选手的姓名和分数。选手的分数按照如下方
式产生:10名裁判对每位选手打分去掉一个最高分再去掉一个最低分剩余的分数取平均值。最后按照分数从高到低的顺序输出选手
的姓名和得分信息。
提示和要求:用STL完成本题目用vector容器存放每位选手的信息每位选手的分数可放入双端队列中用sort()排序后去掉两端,再求
平均值用sort()对vector排序

77
C/题目.md Normal file
View File

@ -0,0 +1,77 @@
练习4.1
小明去美国旅游打电话回来告诉家人美国当地温度是华氏F64度请问摄氏温度C是多少度
它们之间转换关系: C = 5/9*(F-32)。注意:温度是浮点数
练习4.2
有一小车从静止以匀加速1m/s开始运行请问10秒后它的速度是多少走了多远距离
![[be0901734e3e6c86c6e66d780d7a9e3.png]]
练习6.1-编写软件-计算阶梯电价-选择控制结构
为了提倡居民节约用电某省电力公司执行“阶梯电价”安装一户一表的居民用户电价分为两个“阶梯”月用电量50千瓦时含50千瓦时以内的电价为0.53元/千瓦时超过50千瓦时的超出部分的用电量电价上调0.05元/千瓦时。请编写程序计算电费。
练习6.2-编写软件-出租车计价-选择控制结构
本题要求根据某城市普通出租车收费标准编写程序进行车费计算。具体标准如下:
起步里程为3公里起步费10元
超起步里程后10公里内每公里2元
超过10公里以上的部分加收50%的回空补贴费即每公里3元
营运过程中因路阻及乘客要求临时停车的按每5分钟2元计收不足5分钟则不收费
输入格式:
输入在一行中给出输入行驶里程单位为公里精确到小数点后1位与等待时间整数单位为分钟其间以空格分隔。
输出格式:
在一行中输出乘客应支付的车费(单位为元),结果四舍五入,保留到元。
练习6.3-编写软件-计算超速罚款-选择控制结构
(一)时速超过限定时速不到10%的,给予警告;
(二)在限速为50公里以下的道路时速超过限定时速10%以上不到20%的处50元罚款;超过限定时速20%以上不到50%的处100元罚款;超过限定时速50%以上不到70%的处300元罚款;超过限定时速70%的处500元罚款;
(三)在限速为50公里以上80公里以下的道路时速超过限定时速10%以上不到20%的处100元罚款;超过限定时速20%以上不到50%的处150元罚款;超过限定时速50%以上不到70%的处500元罚款;超过限定时速70%的处1000元罚款;
(四)在限速为80公里以上100公里以下的道路时速超过限定时速10%以上不到20%的处150元罚款;超过限定时速20%以上不到50%的处200元罚款;超过限定时速50%以上不到70%的处1000元罚款;超过限定时速70%的处1500元罚款;
(五)在限速为100公里以上的道路时速超过限定时速10%以上不到50%的处200元罚款;超过限定时速50%以上不到70%的处1500元罚款;超过限定时速70%以上的处2000元罚款。
练习8.1-循环-输出n行数字金字塔
![[cff720f3f351189ced1ddba397dc54d.png]]
练习8.2-循环-十进制转十六进制
编写一个函数实现数制的转换,不用递归,用数组实现。在主函数中输入一个十进制数,输出相应的十六进制数。
练习1
利用重载函数的方法设计一个程序,该程序通过函数"calc()"进行计算并返回显示结果。
当传入一个参数时,计算该参数的平方值;
当传入两个参数时,计算两个参数的积;
当传入三个参数时,计算三个参数的和。
练习2
利用函数重载,计算圆形,矩形,梯形的面积。
练习3-1
编写一个函数模板,分别求一个数组里面数据的最大值,最小值和平均值。
void MathHelper(T num[], int size)
练习3-2
编写一个函数模板,实现数据交换的操作。
练习3-3
编写如下形式的排序函数模板:
template<class Type>void sort(Type* A, int n, bool f)
对一个具有n个Type类型的一维数组进行排序f为1表示从小到大排序f为0表示从大到小排序并通过不同参数类型机型调用验证正确性。
练习11.1
递归-使用函数输出指定范围内的Fibonacci数 第n个数
练习19.1-字符串复制
用指针法实现字符串的复制.实现将一个已知字符串的内容复制到一个新的字符串。 不用strcpy
练习19.2-字符串连接
将两个字符串连接起来不要用strcat
练习19.3-指针-字符串长度
编写一函数求一个字符串的长度要求用字符指针实现。在主函数中输入字符串调用该函数输出其长度。不能用strlen
练习19.4-指针数组
输入对应的数字,输出对应的月份。
练习19.5-指针-判定子串
编写一个程序,判定一个字符串是否是另一个字符串的子串,若是,则返回子串在主串中的位置。要求不能使用系统函数。
练习19.6-指针-指向函数的指针
用函数和指针完成下述程序功能有两个整数a和b由用户输入1,2或3。如输入1程序就给出a和b中大者输入2就给出a和b中小者输入3则求a与b之和。创建三个函数根据选择不同调用不同的函数使用函数指针

141
C/题目2.md Normal file
View File

@ -0,0 +1,141 @@
练习21.1-结构体-文件
从键盘输入两个学生数据,写入一个文件中,再读出这两个学生的数据显示在屏幕上。
练习21.2-结构体-文件
建立一个文件向其中写入一组学生的姓名和成绩然后从该文件中读出成绩大于80分的学生信息并显示在屏幕上
练习22.1-编写软件-猜数字游戏-链表
猜数字游戏是令游戏机随机产生一个100以内的正整数用户输入一个数对其进行猜测需要你编写程序自动对其与随机产生的被猜数进行比较并提示大了“Too big”还是小了“Too small”相等表示猜到了。如果猜到则结束程序。程序还要求统计猜的次数如果1次猜出该数提示“Bingo!”如果3次以内猜到该数则提示“Lucky You!”如果超过3次但是在N>3次以内包括第N次猜到该数则提示“Good Guess!”如果超过N次都没有猜到则提示“Game Over”并结束程序。如果在到达N次之前用户输入了一个负数也输出“Game Over”并结束程序。
要求:游戏结束时(无论是否猜到)显示玩家猜数字的过程(用链表)。
练习22.2
单链表逆序输出
练习22.3
单链表排序
位运算练习
1.位运算-二进制输出
按二进制位输出一个整数。例如1000=0000 0011 1110 1000B
2.位运算-值交换(自己画一画过程)
交换两个变量的值,不使用中间变量。
3.位运算-求绝对值
使用位运算求一个数的绝对值。
练习1
下面是一个类的测试程序,设计出能使用如下测试程序的类。
![[1003e54f07f1f747ac8c0cfdf1516da.png]]![[c9b0899e65d2d97e1ba4a70bb4fe2df.png]]
练习2
设计一个立方体类Box它能计算并输出立方体的体积和表面积。要求:
·(1) 包含成员变量m_a(立方体边长)。
·(2) 包含函数SetA(doublea)(设置立方体边长)、GetVolume()(计算体积)、GetArea()(计算表面积)。
·(3) 包含函数Display(),用来输出计算的结果。
·(4)设计测试用主函数main()用来测试Box类。
练习3
设计一个Rectangle类。要求:
·(1) 包含两个成员变量m_length和m_width其默认值为1。
·(2) 包含成员函数Perimeter()计算长方形的周长Area()计算长方形面积。
·(3) 包含成员函数SetWidth()和GetWidth()用来设置和得到m_width的值SetLength()和GetLength()用来设置和得到m_length的
值。Set...()函数应验证m_length和m_width均为0.0到20.0之间的浮点数。
·(4)编写主函数测试Rectangle类。
练习5
编写一个Person类包括:
·1、普通数据成员:姓名,性别,年龄。
·2、三个构造函数:无参数构造函数,有参数构造函数(参数:姓名的指针,年龄,性别),拷贝构造函数。
·3、析构函数
输出人员信息函数print()。
编写main ()函数分别调用三种构造函数创建三个对象P1、P2、P3其中P3的创建是用P2通过深拷贝复制得到的
练习6
编写一个程序输入N个学生数据包括学号、姓名、成绩输出这些学生数据并计算平均分。要求:
·(1) 设计一个学生类Stud除了包括学号、姓名和成绩数据成员外有两个静态变量分别存放总分和人数。
·(2)有两个普通成员函数SetData()和Disp()分别用于给数据成员赋值和输出数据成员的值。另有一个静态成员函数Avg(),它用于
计算平均分。
·(3) 在main()函数中定义一个对象数组用于存储输入的学生数据。
练习7
有一个学生类Student包括学生姓名、成绩要求:
·(1)设计一个友元函数Compare(),比较两个学生成绩的高低。
·(2) 在main()函数中定义一个对象数组用于存储输入学生的数据,并求出最高分和最低分的学生。
练习2-1
请编写程序完成如下设计
·学生类,数据成员包括学号(公有)、姓名(保护)、年龄(私有)、学生数(静态)。学生数用来统计构造出来的学生对象数量
·课代表类,继承自学生类,数据包括负责课程编号(公有)、课程评分(公有)
·要求使用构造初始化符表“:”的形式进行构造,每个类有相关数据的输出显示函数
·在主函数中构造对象并输出显示相关数据
练习2-2
·定义一个点Point类数据成员是浮点型横纵坐标;
·定义一个颜色类Color数据成员只有颜色(字符数组#000000~#FFFFFF);
●一个直线类Line数据成员是两个Point对象表示起点和终点(即Point两个对象为Line的内嵌对象);
·一个三角形类Triangle继承自Line和Color数据成员有三角形的高height三角形理解成以基类Color为颜色以基类直线为底
height为高的直角三角形(即直线和高分别为两条直角边)请实现相关函数,计算三角形的颜色、周长和面积并给出相关输出
```cpp
#include <iostream>
int main(){
}
```
练习2-3
设计日期类和时间类,并以此两类为基类派生日期时间类
要求:
日期类包括年、月、日等成员
·时间类包括时、分、秒等成员
·日期时间类能够实现日期时间的求差、比较大小的功能
1、使用运算符重载实现该功能以时间日期类的对象描述日期时间之差
2、假设每个月都是30天不考虑闰年
3、不考虑公元前
练习2-4
设计圆类,并以圆类为基类,派生圆柱类、圆锥类和圆球类(分别求出其面积和体积)
要求:
·自行确定各类具有的数据成员、函数成员,如果需要对象成员,再自行设计相关类;
·在设计程序过程中,尽量多地涉及类继承与多态性的重要概念,如虚函数、纯虚函数、抽象基类等等。
注:应当用圆类继承一个区域类(或形状类)
练习8
设计一个Rational类进行带分数的运算。要求:
·(1) 包含两个整数成员变量表示分子和分母。
·(2) 包含一个对所声明对象初始化的构造函数。不提供参数时构造函数应提供默认值。分数存放成简化形式例如分数“2/4”应在
对象中存放成分子1和分母2的形式。
·(3)对下列情况提供public成员函数:
a)两个Rational值相加结果保存成简化形式。
b) 两个Rational值相减结果保存成简化形式。
c) 两个Rational值相乘结果保存成简化形式。
d)两个Rational值相除结果保存成简化形式。
e)按a/b形式打印Rational值其中a为分子b为分母。
·(4)编写主函数测试Rational类。
·(5)将上述成员函数改为运算符重载的形式,分别作为成员函数和友元函数实现上述功能。
练习3-4
编写一个类模板,完成对不同数据类型的数组的排序(小到大)操作。
如:
●int array[5]={3,6,2,1,4};
●double array[5]={3.1,1.2,4.5,1.1,0.2};
练习3-5
定义一个堆栈类模板,实现不同数据类型数据的入栈和出栈操作,堆栈的大小用非类型参数指定。
练习3-6
用类模板创建单链表,并实现在链表里增加一个节点和删除一个节点的操作。
练习:文本文件-九九乘法表![[72d1094207daa7f6c6a98a4f10275fd.png]]
练习5-7文件读写、二进制文件
编写一个程序将5种商品的商品号、商品名、单价和数量写入二进制文件f.bin中然后将该文件中的数据读到数组中并将其输出到屏幕上。![[c34b2009414956177d593a62b4f2cc4.png]]
练习5-8文件读写、二进制文件
编写一个程序从文件f.bin(第1题已建立的文件)中读出任意一种商品的数据并输出到屏幕上。比如输入整数2则输出第二种商品的信息
![[1746003581975944b10199ea7232702.png]]

7
GlobalData.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef GLOBALDATA_H
#define GLOBALDATA_H
char g_bufferData[8] = {0};
int g_count = 0;
#endif // GLOBALDATA_H

4
Linux.md Normal file
View File

@ -0,0 +1,4 @@
查看程序使用的编译链
``` bash
readelf -p .comment
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

13
QT/第七章.md Normal file
View File

@ -0,0 +1,13 @@
![[第7章(3课时已更新.ppt]]
第7章重点信号槽的机制和自定义信号槽的使用。了解对象树的机制例如界面类。了解容器、qlist、qstring、qbytearray、qvariant的使用。
![[3e079b2dacb0c6d1a5a22349efca51f.png]]
![[6de3c18328b5209ba72b85b12830e85.png]]
![[31b4af2c637c34f5dd9a2178805f566.png]]
![[1c67bddb94794a221a0b270fce22add.png]]
当然习惯于传统for的使用的人还是很多的。

20
QT/第三章.md Normal file
View File

@ -0,0 +1,20 @@
![[第3章(1课时已更新.ppt]]
第3章重点是使用基础窗口和组件以及使用槽函数连接在其上面点击等操作发出的信号进行自己具体的操作。
![[d836ca5bf444fbea85c5d62b9b84b36.png]]
各个组件可以像这样,拖拽到界面,然后通过创建槽,连接各组件的信号,熟悉组件的用法。
![[decdc9e3db801e3e9d27d3e5e454975.png]]
![[6480b14aaf7b6b0b15a9ff78f0a1716.png]]
![[bffa6e3037d447b3f1fb9186bc405be.png]]
![[5442927f2ae1aeb7e85ea257b063642.png]]
![[cb355e9a8c05d1029098edb443cf7b0.png]]
![[ac6c40c81e6d5d1b07aa9f0cb2c8995.png]]
信号槽的连接connect和转到槽都试一下这两种用的多。另一种用的少可以以后再熟悉。
![[6a34489b1f2cf3d7f825b6589d97c12.png]]
![[48c249bf0d77938a3bae9cad52c467d.png]]
![[2301b46bffa58656717f4dccdd25272.png]]

11
QT/第九章.md Normal file
View File

@ -0,0 +1,11 @@
![[第9章(3课时已更新.ppt]]
第9章重点国际化翻译的使用。创建插件dll和应用程序使用插件。
![[76ccc2eb91d810fb120769a20b187df.png]]
这是qt插件的一个示意图
如果不使用动态加载dll可以在pro文件配置。
![[9bb714eef96f1a75085dbf443150a33.png]]
![[testPlugin.zip]]
![[testPluginApp.zip]]

23
QT/第二十章.md Normal file
View File

@ -0,0 +1,23 @@
![[第20章(1课时已更新.ppt]]
QWaitCondition的使用
![[7941646ae9f8aeb7212bf21961ac0b79_.png]]
![[ce35786fa07e588a9538c0dad8daf521_.png]]
![[278efd24a2830685a4398e4f1faa1194_.png]]
"1thread" 0
"1thread" 1
"1thread" 2
"1thread" 3
"1thread" 4
"1thread" 5
"1thread" 6
"1thread" 7 这里已经满了,无法生产了
"2thread" 0 消费一个之后
"1thread" 8 才能继续生产
"2thread" 1
"1thread" 9
"2thread" 9
![[3451d9c3e1cfa4f092b55089d9a871b2_.png]]
使用两个线程是这样的。
![[threadclock.cpp]]
![[GlobalData.h]]
![[threadclock.h]]

5
QT/第二章.md Normal file
View File

@ -0,0 +1,5 @@
![[第2章(2课时已更新.ppt]]
第2章重点创建新的widget工程设计界面.ui文件的拖拽实现界面应用程序依赖的dll设置应用程序图标icon。工程文件.pro的说明。代码自动补全功能。
![[4304673e2ea5db096c7de5eed4c5e9f.png]]

3
QT/第五章.md Normal file
View File

@ -0,0 +1,3 @@
![[第5章(3课时已更新.ppt]]
第5章 重点和优先级。1、优先级最高-主窗口的实现mainwindow的使用。包括菜单栏、工具栏、中心组件、dock、statusbar。2、拖动的大致实现过程可以敲一敲课件的代码熟悉一下或者简单的输出信息

5
QT/第八章.md Normal file
View File

@ -0,0 +1,5 @@
![[第8章(1课时已更新.ppt]]
第8章重点qt样式表的使用特别是qss文件的方式
关于样式表的使用qt助手中有样例。搜索Qt Style Sheets Examples即可。
![[46e658d6041b47fb78aa4720dd81569.png]]

5
QT/第六章.md Normal file
View File

@ -0,0 +1,5 @@
![[第6章(1课时已更新.ppt]]
第6章重点事件处理函数的使用例如鼠标、键盘事件过滤器的使用定时器的使用信号槽方式
其中,事件过滤器,很有用。

30
QT/第十七章.md Normal file
View File

@ -0,0 +1,30 @@
![[第17章(2课时已更新.ppt]]
第17章重点qt连接数据库的使用。
安装完mysql在odbc配置数据源。
![[92f8bd976d775f7a9b67c3c6954238f.png]]
将lib和dll文件从mysql安装目录找到复制到qt的安装目录下。
![[8d3b90f415b25cbefd48f544124e91d.png]]
![[4ece700f456523e757d44c56c6d11d2.png]]
![[325df8980ecb953d6b11a42310eb2ae 1.png]]
![[68834c79fd94cac9456844aabdb91e2.png]]
常用的一些sql语句
#创建数据库
create database db_name;
#使用数据库,也就是指定当前数据库。
use db_name;
#创建表
create table tb_name (
id int auto_increment primary key,
name varchar(20)
);
#插入数据
insert into tb_name (id, name) values (1,zhao);
#更新数据
update tb_name set name = qian where id = 1;
#删除数据
delete from tb_name where id = 1;
#删除表
drop table tb_name;

22
QT/第十九章.md Normal file
View File

@ -0,0 +1,22 @@
![[第19章(1课时已更新.ppt]]第19章重点线程的使用子类化和线程同步锁和信号量
![[fd4fbf294881512f4a25b16894c2c7ec_.png]]
![[85742fec35bea44361c110e5d9934595_.png]]
一个简单的线程示例,显示当前时间,通过信号槽发送到主线程。
这是我以前写的共享内存的实例代码,共享内存的优先级可以放在后面。
![[027d147db3a0ebe921fd9ad2e9664076_115f7bca329ae801314a770f5d12bdaa_8.zip]]
![[9bfbc9579e6bae78e3887c20a924a060_a82e3bb329e4a61e49d2ee60c669447a_8 1.zip]]
线程和锁的示例:
![[4ae3509a77bbba8eb07fa1aa3d5cdebd_.png]]
![[e126ed32ceb5545b7dc71b6d505d9d8d_.png]]
![[85d88d848f33e6741bd89f976b0799a3_.png]]
一个简单的锁的样例
读锁是不阻塞的
![[a664b00245443af2610ed85316be5baa_.png]]
![[13a1d2593a339ca6e1dd82d2e4c666cf_.png]]
读写锁之间是阻塞的
![[6994f7ae22e288920d7f8c48131a7863_.png]]
![[1aee77a18abcc6bd172fafd345914a25_.png]]
![[601af90279996ffd05fc554b3655fdc2_.png]]
![[faf3e195b449015d171c7627d01bd55b_.png]]

10
QT/第十五章.md Normal file
View File

@ -0,0 +1,10 @@
![[第15章(1课时已更新.ppt]]
第15章重点文件的操作打开、读写、关闭配置文件ini的使用qsettings。其次文件监视器QFileSystemWatcher
![[f87337629223e006d36bff6a9712231.png]]
![[2058cd9a063c9e68f8c25ac2d89dfa3.png]]
以上是QSettings读写配置文件ini的例子
![[1c96f27ff7d0ff328031518234a3820.png]]
![[ec811ac7cf10e0a88a1f84da045270f.png]]
以上是qfile读写文件的例子
![[8d8913f24215ff42251fdf6717d1407.png]]

8
QT/第十八章.md Normal file
View File

@ -0,0 +1,8 @@
![[第18章(2课时已更新.ppt]]
第18章重点udp的使用客户端和服务端udp和tcp的区别其次是tcp的使用客户端和服务端
我自己以前写过这两部分的小demo。发出来给大家参考大家可以结合课件具体写出代码练习。
![[tcp_client.zip]]
![[udp_client.zip]]
![[udp_server.zip]]
![[tcp_server.zip]]

8
QT/第十章.md Normal file
View File

@ -0,0 +1,8 @@
![[第10章(2课时已更新.ppt]]
![[第11章(2课时已更新.ppt]]
![[第12章(1课时已更新.ppt]]
![[第13章(1课时已更新.ppt]]
![[第14章(1课时已更新.ppt]]
我把我这里的一个qss文件发出来大家参考一下
![[style.qss]]
第10章重点使用painter简单绘制文字、线、矩形、多边形等简单形状。本章优先级可以放在其他章的后面。

7
QT/第四章.md Normal file
View File

@ -0,0 +1,7 @@
![[第4章(1课时已更新.ppt]]
第4章重点boxlayout基本布局另外几个布局其次。伙伴和tab顺序排在布局后面有空再熟悉。
代码示例
![[d99805b18eff46c65eaaa9e88ee9daa.png]]
![[d08f9e7c0915b0a331202b67cda69e9.png]]

51
QT/补充内容.md Normal file
View File

@ -0,0 +1,51 @@
![[kafka_2_消息队列通信的模式.pptx]]![[kafka_1_概念.pptx]]
![[kafka_4_消息格式.pptx]]
![[kafka_3_架构原理.pptx]]
![[RocketMq_1_原理.pptx]]
![[RocketMq_2_消息格式.pptx]]
qcustomplot是一个第三方库用来绘制图表的很有名。以后如果遇到绘制图表的需求就会用到它。
官网。https://www.qcustomplot.com/index.php/introduction
1、 下载后将qcustomplot.cpp和qcustomplot.h加入到工程中。
2、 在.pro文件添加打印支持。greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport。否则编译会报错。c++11支持在工程中已经自动添加了。
3、 example是例子程序里面有各种图表。
![[qcustomplot.zip]]
![[016cf2ec99554101094703fbf2d0c6ee_.png]]
![[aaa800e142788cf565ac37315721a8a0_.png]]
![[9880bbadba9f47a4f5ea039bf6a5c589_.png]]
![[298e44ff81e6f5da424ed5794b746193_.png]]
还有另一个第三方库也是用来制作图表的qwt。
官网https://sourceforge.net/projects/qwt/
这个库的使用不是把代码添加进来,而是把动态库添加进来。
步骤:
1、先把qwt-6.1.4.zip解压
进入目录下面用Qt Creator打开qwt.pro文件即打开了Qwt工程。
编译生成的库文件都在build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug下面。
2、
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的libqwt.a和libqwtd.a复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\lib下。
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\lib下的qwt.dll和qwtd.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\bin下。
将build-qwt-Desktop_Qt_5_12_3_MinGW_32_bit-Debug\plugins\designer下的qwt_designer_plugin.dll复制到D:\Qt\Qt5.12.3\5.12.3\mingw73_32\plugins\designer下。
在D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include下新建一个Qwt的文件夹将D:\Qwt-6.1.4\src下的所有.h头文件复制到新建的Qwt文件夹下。
3、新建Qt工程在.pro文件加入
1. DEFINES += QT_DLL QWT_DLL
2.
3. LIBS += -lqwtd
4.
5. LIBS += -lqwt
6.
7. INCLUDEPATH +=D:\Qt\Qt5.12.3\5.12.3\mingw73_32\include\Qwt
4、使用qt designerqt creator里面的设计界面会看不到组件只能看到位置打开ui界面文件可以拖拽qwt组件到界面上。
![[qwt-6.1.4.zip]]

BIN
RocketMq_1_原理.pptx Normal file

Binary file not shown.

Binary file not shown.

49
boost.md Normal file
View File

@ -0,0 +1,49 @@
Windows安装
``` bash
Remove-Item b2.exe, bjam.exe -Force -ErrorAction SilentlyContinue
$mingwPath = "C:\Path\Qt5.12.12\Tools\mingw730_64\bin\"
$env:PATH = "$mingwPath;$env:PATH"
$env:CC = "$mingwPath\gcc.exe"
$env:CXX = "$mingwPath\g++.exe"
$env:RC = "windres --target=pe-x86-64"
.\bootstrap.bat gcc --verbose
.\b2 toolset=gcc --build-type=complete install --prefix="C:\Work\boost_64" -j8
```
linux安装
``` bash
./bootstrap.sh
vim project-config.jam
./b2 link=static toolset=gcc address-model=64 --prefix=/work/lib/boost/gcc install
```
``` bash
./b2 \
--prefix=./install \ # 安装到当前目录的 install 目录(可修改为绝对路径)
--static \ # 仅生成静态库
--disable-shared \ # 禁用动态库(可选,若需纯静态建议开启)
variant=debug,release \ # 同时生成 Debug 和 Release 版本
runtime-link=static \ # 静态链接运行时库(可选,部分场景需要)
cxxflags="-std=c++17 -Wall" \ # 指定 C++ 标准和编译警告
--with-system \ # 编译 system 库(示例,按需添加其他库,如 filesystem、program_options 等)
--with-thread \ # 编译 thread 库
--with-date_time \ # 编译 date_time 库
--install # 编译后安装到 --prefix 指定路径
```
``` project-config.jam
if ! gcc in [ feature.values <toolset> ]
{
using gcc : : /opt/gccs/dg-gcc-aarch64-7.4.1/bin/aarch64-linux-gnu-gcc ;
}
```
./b2 --static --disable-shared variant=debug,release toolset=gcc address-model=64 --prefix=/work/lib/boost/gcc12 install
.\b2 toolset=gcc --build-type=complete --prefix=/work/lib/boost/gcc12_2 install

BIN
kafka_1_概念.pptx Normal file

Binary file not shown.

Binary file not shown.

BIN
kafka_3_架构原理.pptx Normal file

Binary file not shown.

BIN
kafka_4_消息格式.pptx Normal file

Binary file not shown.

BIN
qcustomplot.zip Normal file

Binary file not shown.

BIN
qwt-6.1.4.zip Normal file

Binary file not shown.

43
rbnet.ko 模块.md Normal file
View File

@ -0,0 +1,43 @@
1.安装模块(不再需要加参数)
``` bash
insmod rbnet.ko
```
2.配置需要处理的接口与类型可动态配置enable后任可修改。实时生效不需要rmmod
``` bash
echo lo > /proc/rbnet/ifaces_in
```
输入方向需要去帧头的接口列表多个使用逗号隔开无0xeb90则不做处理
``` bash
echo lo > /proc/rbnet/ifaces_out
```
输出方向需要加帧头的接口列表,多个使用逗号隔开
``` bash
echo 0x17 > /proc/rbnet/dtype_out
```
输出方向帧头中的类型字段,多个使用逗号隔开
3.使能功能
``` bash
echo 1 > /proc/rbnet/enabled
```
``` bash
echo 0 > /proc/rbnet/enabled
```
4.可开启调试信息查看包处理过程
``` bash
echo 1 > /proc/rbnet/hexdump_enable
```
``` bash
dmesg
```
``` bash
insmod rbnet.ko
echo eth0 > /proc/rbnet/ifaces_in
echo eth0 > /proc/rbnet/ifaces_out
echo 0x17 > /proc/rbnet/dtype_out
echo 1 > /proc/rbnet/enabled
```

262
style.qss Normal file
View File

@ -0,0 +1,262 @@
QPushButton
{
background-color: red;
border-style: outset;
border-width: 2px;
border-radius: 10px;
border-color: beige;
font: bold 14px;
min-width: 10em;
padding: 6px;
}
QPushButton:pressed
{
background-color: rgb(224, 0, 0);
border-style: inset;
}
QPushButton:hover
{
background-color: yellow;
}
QPushButton:hover:pressed
{
background-color: green;
}
QPushButton::menu-indicator
{
image: url(:/toolbutton/Next.png);
subcontrol-position: right center;
subcontrol-origin: padding;
left: -2px;
}
QRadioButton::indicator {
width: 20px;
height: 20px;
}
QRadioButton::indicator::unchecked {
image: url(:/radio/status/radio_unchecked.png);
}
QRadioButton::indicator:unchecked:hover {
image: url(:/radio/status/radio_unchecked_hover.png);
}
QRadioButton::indicator:unchecked:pressed {
image: url(:/radio/status/radio_unchecked_pressed.png);
}
QRadioButton::indicator::checked {
image: url(:/radio/status/radio_checked.png);
}
QRadioButton::indicator:checked:hover {
image: url(:/radio/status/radio_checked_hover.png);
}
QRadioButton::indicator:checked:pressed {
image: url(:/radio/status/radio_checked_pressed.png);
}
QCheckBox {
spacing: 5px;
}
QCheckBox::indicator {
width: 20px;
height: 20px;
}
QCheckBox::indicator:unchecked:hover {
image: url(:/checkbox/status/checkbox_unchecked_hover.png);
}
QCheckBox::indicator:unchecked:pressed {
image: url(:/checkbox/status/checkbox_unchecked_pressed.png);
}
QCheckBox::indicator:checked:hover {
image: url(:/checkbox/status/checkbox_checked_hover.png);
}
QCheckBox::indicator:checked:pressed {
image: url(:/checkbox/status/checkbox_checked_pressed.png);
}
QCheckBox::indicator:indeterminate:hover {
image: url(:/checkbox/status/checkbox_indeterminate_hover.png);
}
QCheckBox::indicator:indeterminate:pressed {
image: url(:/checkbox/status/checkbox_indeterminate_pressed.png);
}
QComboBox {
border: 1px solid gray;
border-radius: 3px;
padding: 1px 18px 1px 3px;
min-width: 6em;
}
QComboBox:editable {
background: white;
}
QComboBox:!editable, QComboBox::drop-down:editable {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
}
/* QComboBox gets the "on" state when the popup is open */
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
}
QComboBox:on { /* shift the text when the popup opens */
padding-top: 3px;
padding-left: 4px;
}
QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
border-left-width: 1px;
border-left-color: darkgray;
border-left-style: solid; /* just a single line */
border-top-right-radius: 3px; /* same radius as the QComboBox */
border-bottom-right-radius: 3px;
}
QComboBox::down-arrow {
image: url(:/combobox/status/down_arrow_green.png);
}
QComboBox::down-arrow:on { /* shift the arrow when popup is open */
top: 1px;
left: 1px;
}
QLineEdit {
border: 2px solid gray;
border-radius: 10px;
padding: 0 8px;
background: yellow;
selection-background-color: darkgray;
}
QLineEdit[echoMode="2"] {
lineedit-password-character: 9679;
}
QLineEdit:read-only {
background: lightblue;
}
QTextEdit {
background-color: white;
background-image: url(:/textedit/status/draft.png);
background-repeat: no-repeat;
background-position: center;
background-size: cover;/*无法适应组件大小*/
background-attachment: fixed;
}
QSpinBox {
padding-right: 15px; /* make room for the arrows */
border-image: url(:/spinbox/status/frame.png) 4;
border-width: 3;
}
QSpinBox::up-arrow {
image: url(:/spinbox/status/up_arrow.png);
width: 7px;
height: 7px;
}
QSpinBox::down-arrow {
image: url(:/spinbox/status/down_arrow.png);
width: 7px;
height: 7px;
}
QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off { /* off state when value is max */
image: url(:/spinbox/status/up_arrow_disabled.png);
}
QSpinBox::down-arrow:disabled,
QSpinBox::down-arrow:off { /* off state when value in min */
image: url(:/spinbox/status/down_arrow_disabled.png);
}
QSpinBox::up-button:hover {
border-image: url(:/spinbox/status/up_arrow_hover.png) 1;
}
QSpinBox::down-button:hover {
border-image: url(:/spinbox/status/down_arrow_hover.png) 1;
}
QSpinBox::up-button:pressed {
border-image: url(:/spinbox/status/up_arrow_disabled.png) 1;
}
QSpinBox::down-button:pressed {
border-image: url(:/spinbox/status/down_arrow_disabled.png) 1;
}
QSlider::groove:horizontal {
border: 1px solid #999999;
height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);
margin: 2px 0;
}
QSlider::handle:horizontal {
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
border: 1px solid #5c5c5c;
width: 18px;
margin: -2px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 3px;
}
QSlider::sub-page:horizontal {
background: blue;
}
QSlider::add-page:horizontal {
background: green;
}
QToolButton { /* all types of tool button */
border: 2px solid #8f8f91;
border-radius: 6px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #f6f7fa, stop: 1 #dadbde);
}
QToolButton[popupMode="1"] { /* only for MenuButtonPopup */
padding-right: 20px; /* make way for the popup button */
}
QToolButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #dadbde, stop: 1 #f6f7fa);
}
/* the subcontrols below are used only in the MenuButtonPopup mode */
QToolButton::menu-button {
border: 2px solid gray;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
/* 16px width + 4px for border = 20px allocated above */
width: 16px;
}
QToolButton::menu-arrow {
image: url(downarrow.png);
}
QToolButton::menu-arrow:open {
top: 1px; left: 1px; /* shift it a bit */
}
QProgressBar {
border: 2px solid grey;
border-radius: 5px;
text-align: center;
}
QProgressBar::chunk {
background-color: #CD96CD;
width: 10px;
margin: 0.5px;
}

BIN
tcp_client 1.zip Normal file

Binary file not shown.

BIN
tcp_client.zip Normal file

Binary file not shown.

BIN
tcp_server.zip Normal file

Binary file not shown.

BIN
testPlugin.zip Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More