摘要:
【题目】 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。 示例 1: 输入: 123输出: 321 示例 2: 输入: -123输出: -321示例 3: 输入: 120输出: 21注意: 假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为 [−231, 23 阅读全文
摘要:
二叉树遍历C语言实现 https://www.jianshu.com/p/49cc129c36bd 阅读全文
摘要:
递归和迭代算法深入分析 原文链接:https://blog.csdn.net/liujian20150808/article/details/49717427 递归的定义: 程序调用自身的编程技巧称为递归( recursion)。 迭代的定义: 迭代是重复反馈过程的活动,其目的通常是为了逼近所需目标 阅读全文
摘要:
gtest 提供了一套优秀的 C++ 单元测试解决方案,简单易用,功能完善,非常适合在项目中使用以保证代码质量。 https://blog.csdn.net/jcjc918/article/details/52029455 阅读全文
摘要:
原文链接:https://www.cnblogs.com/fengbohello/p/7571722.html 互斥的概念 在多线程编程中,引入了对象互斥锁的概念,来保证共享数据操作的完整性。 每个对象都对应于一个可称为" 互斥锁" 的标记,这个标记用来保证在任一时刻, 只能有一个线程访问该对象。 阅读全文
摘要:
【一】VSCODE官方插件库 https://marketplace.visualstudio.com/ 最好能在文件->首选项->设置中,搜索update,将Auto Update关闭,否则,如果网络或者配置有问题,在重启vscode时,会经常出现c/c++扩展更新,然后更新失败的问题 【二】菜单 阅读全文
摘要:
参考: https://dulishu.top/libevent-event-loop/ 阅读全文
摘要:
https://books.studygolang.com/gopl-zh/ https://chai2010.cn/advanced-go-programming-book/ 阅读全文
摘要:
服务端【编译:gcc server.c -o server】 客户端【编译:gcc client.c -o client 【备注:需要修改服务端地址,代码中为1.2.3.4】】 参考: https://www.cnblogs.com/yusenwu/p/4579167.html 阅读全文
摘要:
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #include <fcntl.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <regex.h> int main(){ 阅读全文