摘要: // 1. retrieve the vertex/fragment source code from filePath std::string vertexCode; std::string fragmentCode; std::ifstream vShaderFile; std::ifstrea 阅读全文
posted @ 2023-03-30 09:55 刘大侠GG_B 阅读(21) 评论(0) 推荐(0) 编辑
摘要: char *map_shm = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); 该种情况下会报 mmap: Operation not permitted 修改为 char *map_shm = mmap(NULL, size, PROT_READ, 阅读全文
posted @ 2023-01-10 16:04 刘大侠GG_B 阅读(1328) 评论(0) 推荐(0) 编辑
摘要: RPM打包浅析 0:需要储备的知识及其目的: 需要要储备的知识 对makefile有一定的了解。 C代码的编译及基本的C语法。 注:只需要能基本看懂第二节做好准备打包一个简单程序的内容即可。 教学目的 能将自己编写的程序打包成RPM包,发布到网上供大家下载并安装使用。 一:RPM 基础知识 若要构建 阅读全文
posted @ 2021-12-21 14:24 刘大侠GG_B 阅读(624) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <fstream> using namespace std; int main() { ostream hexout(cout.rdbuf()); hexout.setf(ios::hex, ios::basefield); hexout.s 阅读全文
posted @ 2021-11-19 17:50 刘大侠GG_B 阅读(43) 评论(0) 推荐(0) 编辑
摘要: centos 内核调试技巧 参考网址 远程窗口控制终端 参考命令手册 [lhx@lhx-master ~]$ man dracut.cmdline [lhx@lhx-master ~]$ man dracut [lhx@lhx-master ~]$ man bootup 修改grub.cfg 通过串 阅读全文
posted @ 2021-08-31 14:44 刘大侠GG_B 阅读(219) 评论(0) 推荐(0) 编辑
摘要: $( "#cnblogs_post_body" ).catalog() centos系统中内置一个livecd系统 1:准备一个livecd的系统 [root@localhost iso]# ls /usr/iso/CentOS-7-x86_64-LiveGNOME-1804.iso /usr/is 阅读全文
posted @ 2021-07-21 17:41 刘大侠GG_B 阅读(539) 评论(0) 推荐(0) 编辑
摘要: ###scl-utils-build 包中含有很多的scl相关的宏定义。编译gcc-toolset-9开头的源码包需要先安装此包 阅读全文
posted @ 2021-05-28 10:15 刘大侠GG_B 阅读(34) 评论(0) 推荐(0) 编辑
摘要: ###网络服务器编程相关 服务端主动关闭连接的缺点之一是会多占用服务器资源。服务端主动关闭连接之后会进入TIME_WAIT状态,在一段时间之内持有(hold)一些内核资源。如果并发访问量很高,就会影响服务端的处理能力。这似乎暗示我们应该把协议设计为客户端主动关闭,让TIME_WAIT状态分散到多台客 阅读全文
posted @ 2021-05-14 10:12 刘大侠GG_B 阅读(84) 评论(0) 推荐(0) 编辑
摘要: ###1: 将[first,last)范围内的元素重新排列到下一个字典顺序上更大的排列 详见链接 template bool next_permutation (BidirectionalIterator first, BidirectionalIterator last); template <c 阅读全文
posted @ 2021-05-13 16:05 刘大侠GG_B 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 近日服务器安装CentOS8操作系统,想在这台机器安装KVM虚拟机。需要配置网桥,以方便虚拟机能够局域网中的其他机器处于同一网段相通。 Bridge(网桥)是 Linux 上用来做 TCP/IP 二层协议交换的设备,与现实的交换机功能相似。网桥设备实例可以和 Linux 上其他网络设备实例连接。当有 阅读全文
posted @ 2021-05-11 17:21 刘大侠GG_B 阅读(999) 评论(0) 推荐(0) 编辑