上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: 基于tiny-httpd的一个http server,可处理 GET和POST请求。 知识范围: ## POSIX接口 **pipe(int arr[2])** pipe(int arr[2]); 使用pipe会创建通道,arr[0]为读,arr[1]为写。 **dup2 - 复制文件描述符** 这 阅读全文
posted @ 2023-07-11 22:33 皮豪 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 在操作文件的时候,或者处理 http 请求时,可能需要处理文件的类型 这里我的需求是获取文件后缀 使用的方法是 strrchr ``` /* char *strrchr(const char *s, int c); The strrchr() function returns a pointer t 阅读全文
posted @ 2023-07-10 08:51 皮豪 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 实际是要判断 numbytes 是否等于-1,而不是要判断结果赋给numbytes ``` if((numbytes = recv(sockfd, buf, sizeof buf,0)) == -1) if(numbytes = recv(sockfd, buf, sizeof buf,0) == 阅读全文
posted @ 2023-06-23 00:47 皮豪 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include // 使用inet_ntoa 需要 引包 #include int main(int argc,char *argv[]){ struct hostent *host; char hostname[]="www.kbug 阅读全文
posted @ 2023-06-20 22:53 皮豪 阅读(74) 评论(0) 推荐(0) 编辑
摘要: ``` Windows Registry Editor Version 5.00 [HKEY_USERS\.DEFAULT\Control Panel\Input Method\Hot Keys\00000010] "Key Modifiers"=hex:00,c0,00,00 "Target IM 阅读全文
posted @ 2023-06-12 11:42 皮豪 阅读(13) 评论(0) 推荐(0) 编辑
摘要: ``` @Component public class EmailUtil { @Value("${email.user}") private String emailUser; @Value("${email.password}") private String password; private 阅读全文
posted @ 2023-05-30 07:28 皮豪 阅读(51) 评论(0) 推荐(0) 编辑
摘要: ``` /* 滚动条 */ body *::-webkit-scrollbar { width: 5px; height: 10px; } body *::-webkit-scrollbar-track { background: #fff; border-radius: 2px; } body * 阅读全文
posted @ 2023-05-29 21:35 皮豪 阅读(337) 评论(0) 推荐(0) 编辑
摘要: ``` ``` 阅读全文
posted @ 2023-05-29 21:29 皮豪 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 如下代码,建议用这个,e.keyCode 已经过时,后面都是用 e.key:string. onMounted(() => { window.addEventListener('keydown', (e) => { if (e.ctrlKey && e.key 's') { // 检查是否按下了 C 阅读全文
posted @ 2023-04-28 11:29 皮豪 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 需求:因为下载的nginx的文件地址是UUID组成的,要下载呢就需要用axios。然后结合我上一篇文章,把nginx的跨域打开。 http://localhost:8085/project_1/2023/04/27/C9E9CC592AF849F7BFA025F16E2271BD.sql https 阅读全文
posted @ 2023-04-27 23:18 皮豪 阅读(53) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 15 下一页