会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
insistYuan
写给自己看的,详聊Q我或者写封信吧!
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
19
下一页
2022年1月7日
linux 获取Pci-E设备列表(脚本)
摘要: 1 #!/bin/bash 2 # 3 #通过dmidecode获取有关“Designation:、Type:、Current Usage:、Length:、Bus Address:的信息,并输出到/tmp/dmidecode_slot.log文件内 4 dmidecode -t slot | gr
阅读全文
posted @ 2022-01-07 11:50 insistYuan
阅读(953)
评论(0)
推荐(0)
2021年12月29日
C printf ANSI控制码之字体颜色、背景颜色
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 4 #define COLOR_NONE "\033[0m" 5 #define COLOR_HIGHLIGHT "\033[1m" 6 #define COLOR_NON_BOLD "\033[22m" 7
阅读全文
posted @ 2021-12-29 17:47 insistYuan
阅读(245)
评论(0)
推荐(0)
2021年9月22日
查看ipsec 状态
摘要: ipsec status: # ipsec status Security Associations (1 up, 0 connecting): 2[3]: ESTABLISHED 9 minutes ago, 172.16.5.102[CN=server, C=CN]...172.16.5.104
阅读全文
posted @ 2021-09-22 14:47 insistYuan
阅读(2551)
评论(0)
推荐(0)
2021年5月26日
nginx服务在html中嵌入php代码无法显示问题
摘要: 问题描述 搭建nginx服务后,在index.html文件中嵌入php代码,浏览器会将php代码注释掉,进而不解释php代码。 解决方法 首先修改nginx.conf配置文件(或者其他的nginx配置文件),修改内容如下: location ~ \.php|\.html$ { // 修改位置,原
阅读全文
posted @ 2021-05-26 13:12 insistYuan
阅读(604)
评论(0)
推荐(1)
2021年2月4日
关于strsep函数以及联想
摘要: 今天在调用strsep函数时,报了Segmentation fault错误,strsep函数原型如下: char *strsep(char **stringp, const char *delim); 第一个参数是个二级指针,而且没有const修饰,我猜测在man手册中只要是添加const修饰的参数
阅读全文
posted @ 2021-02-04 16:39 insistYuan
阅读(897)
评论(0)
推荐(0)
2021年2月2日
system替代函数
摘要: // 使用popen代替system函数 int my_system(const char * cmd) { FILE * fp; int res;if (cmd == NULL) { printf("my_system cmd is NULL!\n"); return -1; } if ((fp
阅读全文
posted @ 2021-02-02 15:46 insistYuan
阅读(918)
评论(0)
推荐(0)
system问题总结记录
摘要: 今天在写程序的时候,需要用到system函数,早就知道system函数存在使用风险,但是只知其然不知其所以然,好在早有大佬研究过了,以下转自:https://blog.csdn.net/u011006622/article/details/77643680 留作记录,以便查询。 这几天调程序(嵌入式
阅读全文
posted @ 2021-02-02 15:38 insistYuan
阅读(268)
评论(0)
推荐(0)
C语言-判断文件是否存在
摘要: 1 #include <stdbool.h> 2 #include <sys/types.h> 3 #include <sys/stat.h> 4 #include <unistd.h> 5 6 bool file_exist(const char *path) // 返回值:0 - 不存在, 1
阅读全文
posted @ 2021-02-02 10:18 insistYuan
阅读(505)
评论(0)
推荐(0)
2021年1月12日
使用 mtrace 分析 “内存泄漏”
摘要: 使用 mtrace 分析 “内存泄漏” Wang Chen 创作于 2019/09/09 打赏 By unicornx of TinyLab.org Aug 10, 2019 1 内存泄漏导论 在工作中,特别是采用 C 语言编写程序时,动态内存分配是常有的事,而伴随动态内存分配而来的最大的问题就是所
阅读全文
posted @ 2021-01-12 17:02 insistYuan
阅读(974)
评论(0)
推荐(0)
mtrace-内存使用追踪(内存)
摘要: 1. 函数格式: 1 #include <mcheck.h> 2 3 void mtrace(void); 4 5 void muntrace(void); mtrace 用于开启内存使用记录,muntrace用于取消内存使用记录。内存使用情况记录到一个文件,值由环境变量:MALLOC_TRACE决
阅读全文
posted @ 2021-01-12 16:50 insistYuan
阅读(1465)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
19
下一页
公告