07 2020 档案

非阻塞socket
摘要:非阻塞socket(异步socket) 进程或线程执行socket函数时不必非要等待该socket事件的发生,一旦执行立即返回。根据返回值的不同可以判断函数的执行情况,如果事件发生则与阻塞方式相同,若事件没有发生则返回一个代码来告知事件未发生,而进程或线程可以不被阻塞,继续执行。 特点:函数执行立即 阅读全文

posted @ 2020-07-31 22:09 lydstory 阅读(294) 评论(0) 推荐(0) 编辑

vscode 中文
摘要:ext install gbktoutf8 阅读全文

posted @ 2020-07-31 21:40 lydstory 阅读(105) 评论(0) 推荐(0) 编辑

curses
摘要:curses.h 控制台输出按钮等 阅读全文

posted @ 2020-07-31 19:15 lydstory 阅读(120) 评论(0) 推荐(0) 编辑

Trie
摘要:Trie一般指字典树。又称单词查找树,Trie树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。它的优点是:利用字符串的公共前缀来减少查询时间,最大限度地减少无谓的字符串比较,查询效率比哈希树高。 阅读全文

posted @ 2020-07-31 19:12 lydstory 阅读(163) 评论(0) 推荐(0) 编辑

c tcp server
摘要:c lua c accept fork popen 执行业务命令 c tcp server 106-> 阅读全文

posted @ 2020-07-31 16:50 lydstory 阅读(215) 评论(0) 推荐(0) 编辑

linux高性能服务器编程(tcp超时)
摘要:#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdlib.h> #include <assert.h> #include <stdio. 阅读全文

posted @ 2020-07-31 14:56 lydstory 阅读(132) 评论(0) 推荐(0) 编辑

flock fileno
摘要:FILE* file = fopen(, "w"); if (!file) { return false; } flock(fileno(file), LOCK_EX); //加锁 fwrite( , 1, , file); flock(fileno(file), LOCK_UN); //解锁 fc 阅读全文

posted @ 2020-07-30 16:38 lydstory 阅读(150) 评论(0) 推荐(0) 编辑

commoncpp makefile
摘要: 阅读全文

posted @ 2020-07-30 15:11 lydstory 阅读(105) 评论(0) 推荐(0) 编辑

C++错误解决:double free or corruption (out): 0x00000000011abe70 ***
摘要:错误信息 double free or corruption (out): 0x00000000011abe70 ***问题分析 基本上根据题目判定,类型没得跑,内存问题。 所以会有几种情况: 1. 内存重复释放,看程序中是否释放了两次空间(一般不会是这种情况,毕竟。。太明显) 2. 内存越界。(大 阅读全文

posted @ 2020-07-30 11:41 lydstory 阅读(1959) 评论(0) 推荐(0) 编辑

多线程 多进程
摘要:多线程 多进程 永恒的话题 》 c++ 淘汰了吗 阅读全文

posted @ 2020-07-29 22:42 lydstory 阅读(84) 评论(0) 推荐(0) 编辑

已连接到log服务器
摘要:已连接到log服务器 阅读全文

posted @ 2020-07-29 18:47 lydstory 阅读(86) 评论(0) 推荐(0) 编辑

返回char*
摘要:char *get_cur_version() { static char line[128]; memset(line,0,sizeof(line)); FILE *fp; fp = fopen("/etc/version","r"); if( NULL == fp) return NULL; f 阅读全文

posted @ 2020-07-29 11:53 lydstory 阅读(137) 评论(0) 推荐(0) 编辑

flock-->fopen
摘要:flock(fd,LOCK_EX); flock(fd,LOCK_UN); 阅读全文

posted @ 2020-07-29 11:52 lydstory 阅读(139) 评论(0) 推荐(0) 编辑

touch thread.h thread.cpp
摘要:源码空白 makefile 也可以编译 阅读全文

posted @ 2020-07-29 11:31 lydstory 阅读(101) 评论(0) 推荐(0) 编辑

软件编码工程思想
摘要:软件编码工程思想 软件编码工程思想 软件编码工程思想 》编码 工程 思想,流程?? 阅读全文

posted @ 2020-07-29 10:59 lydstory 阅读(52) 评论(0) 推荐(0) 编辑

网闸
摘要:msgrcv 阅读全文

posted @ 2020-07-29 10:27 lydstory 阅读(93) 评论(0) 推荐(0) 编辑

struct stat buf
摘要:监控文件状态,如果文件状态发生变化 启动停止执行 ??? 文件监视程序 阅读全文

posted @ 2020-07-29 10:22 lydstory 阅读(162) 评论(0) 推荐(0) 编辑

curses编程函数
摘要:http://blog.sina.com.cn/s/blog_68624a580100iqff.html 阅读全文

posted @ 2020-07-28 15:42 lydstory 阅读(97) 评论(0) 推荐(0) 编辑

非线程安全
摘要:多线程安全 如果是非线程安全 多线程调用 》 json sqlite curl 等等 如果是非线程安全的 》 阅读全文

posted @ 2020-07-28 14:47 lydstory 阅读(117) 评论(0) 推荐(0) 编辑

struct dirent DT_REG
摘要:struct dirent DT_REG d_type表示档案类型: 1 enum 2 { 3 DT_UNKNOWN = 0, //未知类型 4 # define DT_UNKNOWN DT_UNKNOWN 5 DT_FIFO = 1, //管道 6 # define DT_FIFO DT_FIFO 阅读全文

posted @ 2020-07-27 21:13 lydstory 阅读(4631) 评论(0) 推荐(1) 编辑

layui
摘要:layui layui layui 阅读全文

posted @ 2020-07-27 18:21 lydstory 阅读(82) 评论(0) 推荐(0) 编辑

cd desktop
摘要:cmd cd desktop cd desktop cd desktop 阅读全文

posted @ 2020-07-27 18:14 lydstory 阅读(318) 评论(0) 推荐(0) 编辑

java队列 任务 多线程
摘要:java队列 任务 多线程,每个必须接收响应,响应存储oracle mysql 阅读全文

posted @ 2020-07-27 09:51 lydstory 阅读(162) 评论(0) 推荐(0) 编辑

pdfunite 合并pdf
摘要:操作系统:ubuntu 快捷键Ctrl+Alt+T进入终端操作: 首先进入要合并的pdf的目录 然后下面这条命令是合并当前目录下全部pdf文件pdfunite *.pdf all.pdf 当然也可以合并部分,或者按顺序合并 pdfunite 1.pdf 2.pdf 3.pdf 4.pdf all-1 阅读全文

posted @ 2020-07-26 16:31 lydstory 阅读(368) 评论(0) 推荐(0) 编辑

寄存器eax
摘要:https://www.cnblogs.com/williamjie/p/9502709.html 阅读全文

posted @ 2020-07-26 08:19 lydstory 阅读(85) 评论(0) 推荐(0) 编辑

fork子进程执行等待结束代码
摘要:pid_t childpid; int nRet = 0; if( (childpid =fork()) == 0) { exit(0); } else if(childpid == -1) { nRet = -1; } int status = 0; for(;;){ int rpid =wait 阅读全文

posted @ 2020-07-25 22:47 lydstory 阅读(366) 评论(0) 推荐(0) 编辑

the snow fails and the wind blows
摘要:the snow fails and the wind blows 阅读全文

posted @ 2020-07-25 11:00 lydstory 阅读(72) 评论(0) 推荐(0) 编辑

dll只提供自己的接口,别的接口全部封死
摘要:dll只提供自己的接口,别的接口全部封死 dll只提供自己的接口,别的接口全部封死 dll只提供自己的接口,别的接口全部封死 阅读全文

posted @ 2020-07-23 11:58 lydstory 阅读(141) 评论(0) 推荐(0) 编辑

今日头条之浅见-大众俗乐与国际高端
摘要:大众俗乐,大众俗了。低端俗乐越来越被大众所厌恶。包括影视、游戏、动漫收费之后都在追求高端,精品。 虽然世界格局由于健康疫情的有所分向,但国人大众俗乐越来越多的有识人士,抵制碎片化手机时间,垃圾信息,无良媒体,精神垃圾。 真正有思想、有灵魂的作品、文化、精品越来越被世界所期待认可。 大众俗乐 低俗 无 阅读全文

posted @ 2020-07-23 08:02 lydstory 阅读(145) 评论(0) 推荐(0) 编辑

谈人生:使之有用
摘要:谈人生,使之有用 即解决实际问题,情感经历最深刻之体验式教育。深度刨析到心里,思索到大脑,还必须体测到四肢。 寓教于乐。 七情六欲 》(教学 》(疯狂英语--精神病) 阅读全文

posted @ 2020-07-23 07:48 lydstory 阅读(97) 评论(0) 推荐(0) 编辑

写入buffer 文件 换行
摘要: 阅读全文

posted @ 2020-07-17 11:03 lydstory 阅读(232) 评论(0) 推荐(0) 编辑

最后几行 文件
摘要:tail -n 100 阅读全文

posted @ 2020-07-17 09:44 lydstory 阅读(82) 评论(0) 推荐(0) 编辑

pam配置
摘要:1.lib64/secrity/pam_userpass.so 2/usr/local/lib/libpam.so 3.express_user /etc/pam.d cp 阅读全文

posted @ 2020-07-16 16:28 lydstory 阅读(125) 评论(0) 推荐(0) 编辑

c 获取第一个文件 移动
摘要:#include <stdio.h> #include <stdlib.h> #include <dirent.h> #include <errno.h> #include <string.h> #define MAX 1024 int get_file_count(char *root,char* 阅读全文

posted @ 2020-07-15 17:38 lydstory 阅读(179) 评论(0) 推荐(0) 编辑

复制1万个pdf
摘要:#include<stdio.h> #include<unistd.h> #include<string.h> int main() { FILE *fp=NULL; int i = 0; for(i=0; i<10000;i++) { char buff[128]={0}; memset(buff 阅读全文

posted @ 2020-07-15 17:07 lydstory 阅读(137) 评论(0) 推荐(0) 编辑

find -luuid
摘要:yum install libuuid-devel 阅读全文

posted @ 2020-07-15 16:17 lydstory 阅读(82) 评论(0) 推荐(0) 编辑

c语言文件目录操作 ls
摘要:https://www.cnblogs.com/wuyepeng/p/9789466.html 阅读全文

posted @ 2020-07-15 14:42 lydstory 阅读(117) 评论(0) 推荐(0) 编辑

查看 sem_t
摘要:gcc get.c -o get -lpthread #include <unistd.h>#include <stdlib.h>#include <fcntl.h>#include <sys/types.h>#include <semaphore.h>#include <stdio.h>int m 阅读全文

posted @ 2020-07-13 20:59 lydstory 阅读(216) 评论(0) 推荐(0) 编辑

杀掉某个字符串相关进程
摘要:ps -ef | grep wmsvc | grep -v grep | cut -c 9-15 | xargs kill -9 字符串wmsvc 阅读全文

posted @ 2020-07-13 16:18 lydstory 阅读(118) 评论(0) 推荐(0) 编辑

sem_post
摘要:信号量 加1 原子操作 sem_wait -1 阅读全文

posted @ 2020-07-13 14:27 lydstory 阅读(130) 评论(0) 推荐(0) 编辑

linux fflush
摘要:函数名: fflush 功 能: 清除读写缓冲区,在需要立即把输出缓冲区的数据进行物理写入时 头文件:stdio.h 原型:int fflush(FILE *stream) 其中stream是要冲洗的流 阅读全文

posted @ 2020-07-13 14:21 lydstory 阅读(380) 评论(0) 推荐(0) 编辑

setsockopt linux
摘要:setsockopt()支持下列选项。其中“类型”表明optval所指数据的类型。 选项 类型 意义 SO_BROADCAST BOOL 允许套接口传送广播信息。 SO_DEBUG BOOL 记录调试信息。 SO_DONTLINER BOOL 不要因为数据未发送就阻塞关闭操作。设置本选项相当于将SO 阅读全文

posted @ 2020-07-13 10:54 lydstory 阅读(160) 评论(0) 推荐(0) 编辑

hansight
摘要:https://www.hansight.com 阅读全文

posted @ 2020-07-12 15:39 lydstory 阅读(137) 评论(0) 推荐(0) 编辑

owncloud php私有云盘
摘要:owncloud php私有云盘 阅读全文

posted @ 2020-07-12 14:23 lydstory 阅读(191) 评论(0) 推荐(0) 编辑

线程是CPU调度和分配的基本单位。
摘要:于是线程是CPU调度和分配的基本单位。 阅读全文

posted @ 2020-07-10 18:07 lydstory 阅读(1824) 评论(0) 推荐(0) 编辑

进程与线程的切换比较
摘要:进程切换分两步: 1.切换页目录以使用新的地址空间 2.切换内核栈和硬件上下文 对于linux来说,线程和进程的最大区别就在于地址空间,对于线程切换,第1步是不需要做的,第2是进程和线程切换都要做的。 切换的性能消耗: 1、线程上下文切换和进程上下问切换一个最主要的区别是线程的切换虚拟内存空间依然是 阅读全文

posted @ 2020-07-10 18:02 lydstory 阅读(544) 评论(0) 推荐(0) 编辑

schedule
摘要:schedule 英[ˈʃedjuːl] 美[ˈskedʒuːl] n. 工作计划; 日程安排; (电视或广播) 节目表; (价格、收费或条款等的) 一览表,明细表,清单; 阅读全文

posted @ 2020-07-10 17:42 lydstory 阅读(2448) 评论(0) 推荐(0) 编辑

有名 无名sem_t*
摘要:https://www.cnblogs.com/aizquan/p/6007306.html 阅读全文

posted @ 2020-07-10 17:40 lydstory 阅读(137) 评论(0) 推荐(0) 编辑

关于waitpid()中的WNOHANG
摘要:WNOHANG 拆解为 W NO HANG,即不阻塞模式。 如果当前进程没有该指定的子进程,或者函数执行错误,waitpid()返回值为-1。注:当第一个参数为-1时,指代任意子进程。当为某一pid时,指代该pid的子进程。 如果该子进程没有结束,则返回0;如果该子进程已经结束,则返回该pid; 无 阅读全文

posted @ 2020-07-10 16:46 lydstory 阅读(1013) 评论(0) 推荐(0) 编辑

gdb跟踪子进程
摘要:set follow-fork-mode child gdb跟踪子进程 阅读全文

posted @ 2020-07-10 10:16 lydstory 阅读(704) 评论(0) 推荐(0) 编辑

CC2541
摘要:CC2541 蓝牙模块 阅读全文

posted @ 2020-07-08 19:24 lydstory 阅读(111) 评论(0) 推荐(0) 编辑

iftop 流量
摘要:https://www.cnblogs.com/chenshoubiao/p/4780971.html 阅读全文

posted @ 2020-07-08 14:50 lydstory 阅读(116) 评论(0) 推荐(0) 编辑

云风github
摘要:https://github.com/cloudwu?before=Y3Vyc29yOnYyOpK5MjAxOC0wNS0xMVQwOTo1MjoxMSswODowMM4Fg4Qx&tab=repositories 阅读全文

posted @ 2020-07-07 20:26 lydstory 阅读(211) 评论(0) 推荐(0) 编辑

bdb更新速度
摘要:update value 30万 1.5秒 每秒 20万条记录 本机虚拟机 8G内存 单核 一次打开 一次关闭 中间循环update 阅读全文

posted @ 2020-07-05 04:26 lydstory 阅读(89) 评论(0) 推荐(0) 编辑

bdb 支持类型
摘要:The type parameter is of type DBTYPE, and must be set to one of DB_BTREE, DB_HASH,DB_HEAP, DB_QUEUE, DB_RECNO, or DB_UNKNOWN. If type is DB_UNKNOWN, t 阅读全文

posted @ 2020-07-05 00:00 lydstory 阅读(143) 评论(0) 推荐(0) 编辑

long转32位字符串前面补零 c语言
摘要:#include <stdio.h> char* Lx_itoaEx(long value, char* str, long radix) { static char dig[] = "0123456789" "abcdefghijklmnopqrstuvwxyz"; long n = 0, neg 阅读全文

posted @ 2020-07-03 17:23 lydstory 阅读(473) 评论(0) 推荐(0) 编辑

itoa linux版
摘要:char* Lx_itoaEx(int value, char* str, int radix) { static char dig[] = "0123456789" "abcdefghijklmnopqrstuvwxyz"; int n = 0, neg = 0; unsigned int v; 阅读全文

posted @ 2020-07-03 16:11 lydstory 阅读(280) 评论(0) 推荐(0) 编辑

pdf 处理字体
摘要:https://github.com/libharu/libharu 阅读全文

posted @ 2020-07-03 15:34 lydstory 阅读(124) 评论(0) 推荐(0) 编辑

pdf生成例子
摘要:http://www.vulcanware.com/cpp_pdf/index.html http://www.vulcanware.com/resume.html http://www.vulcanware.com/more_cpp.html 老外个人简历例子代码 阅读全文

posted @ 2020-07-03 14:59 lydstory 阅读(135) 评论(0) 推荐(0) 编辑

c语言中static
摘要:1.static修饰作用于本地文件 2.不能全局访问 局部一个文件访问 阅读全文

posted @ 2020-07-03 08:52 lydstory 阅读(85) 评论(0) 推荐(0) 编辑

draw
摘要:draw 英[drɔː] 美[drɔː] v. (用铅笔、钢笔或粉笔) 画,描绘,描画; 拖(动); 拉(动); 牵引; 拉,拖(车); 吸引,使感兴趣; 阅读全文

posted @ 2020-07-02 15:11 lydstory 阅读(731) 评论(0) 推荐(0) 编辑

json_object_put json-c库
摘要:json_object_put 阅读全文

posted @ 2020-07-02 14:31 lydstory 阅读(1392) 评论(0) 推荐(0) 编辑

truncate
摘要:truncate 英[trʌŋˈkeɪt] 美[ˈtrʌŋkeɪt] v. 截短,缩短,删节(尤指掐头或去尾); [例句]Basal leaf blade oblong or elliptic, truncate or cuneate at base. 基生叶长圆形或椭圆形,截形或楔形在基部。 [其 阅读全文

posted @ 2020-07-01 11:37 lydstory 阅读(972) 评论(0) 推荐(0) 编辑

ftruncate
摘要:相关函数:open、truncate表头文件:#include <unistd.h>函数原型:int ftruncate(int fd, off_t length)函数说明:ftruncate()会将参数fd指定的文件大小改为参数length指定的大小。参数fd为已打开的文件描述词,而且必须是以写入 阅读全文

posted @ 2020-07-01 11:35 lydstory 阅读(438) 评论(0) 推荐(0) 编辑

rewind
摘要:rewind 英[ˌriːˈwaɪnd] 美[ˌriːˈwaɪnd] v. 重绕(磁带等); 倒带; 倒片; n. 重绕; 倒带器; 阅读全文

posted @ 2020-07-01 10:59 lydstory 阅读(682) 评论(0) 推荐(0) 编辑

time0 time1 时间统计
摘要:#include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <unistd.h> #include <pthread.h> #include <sys/time.h> static u 阅读全文

posted @ 2020-07-01 10:34 lydstory 阅读(234) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示