摘要: 二分搜索法 git bisect 命令,可以定位问题引入的第一个commit,如下图: 用法举例: 1、下载模拟代码: $ git clone git@github.com:bradleyboy/bisectercise.git $ cd bisectercise 2、浏览器打开网页,网页上是一个计 阅读全文
posted @ 2022-10-23 21:53 Mr.van_Gogh 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 操作系统缓存和缓冲 操作系统缓存和缓冲主要包括:cache(缓存)、buffer(缓冲)、swap等,通过free -m命令可以查看。 cache Cache(缓存)则是系统两端处理速度不匹配时的一种折衷策略。因为CPU和memory之间的速度差异越来越大,所以人们充分利用数据的局部性(locali 阅读全文
posted @ 2022-10-23 11:50 Mr.van_Gogh 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 拉取docker镜像: docker pull centos 启动docker镜像,并将容器的22端口映射到本机50001端口: docker run -it -p 50001:22 --privileged centos /usr/sbin/init 进入容器: docker exec -ti < 阅读全文
posted @ 2022-10-23 01:22 Mr.van_Gogh 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Netlink实现网卡上下线监控 https://blog.csdn.net/sourthstar/article/details/7975999 阅读全文
posted @ 2019-07-21 22:18 Mr.van_Gogh 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1、问题:javah or javac -h 在配置好java的环境变量后,java和javac都是可以用的,但是用javah就会出现问题。 会报错误 Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-1 阅读全文
posted @ 2019-07-21 21:28 Mr.van_Gogh 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: 1、sublime text3,Tools/Build System/New Build system创建一个新配置文件。 {"cmd": ["gcc", "${file}", "-o", "${file_path}/${file_base_name}"],"file_regex": "^(..[^ 阅读全文
posted @ 2019-07-21 18:01 Mr.van_Gogh 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main { 2 3 public Node removeDup(Node node){ 4 5 if (node == null || node.next == null || node.next.next == null){ 6 return node; 7 } 8 9 ... 阅读全文
posted @ 2018-12-02 10:45 Mr.van_Gogh 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.HashSet; 2 import java.util.Set; 3 4 public class Main { 5 6 // 从无序链表中删除重复项 7 public Node removeDup(Node node) { 8 9 if (node == null || node.next == nu... 阅读全文
posted @ 2018-12-01 23:50 Mr.van_Gogh 阅读(717) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main { 2 3 // 逆序打印链表 4 public void reversePrint(Node node) { 5 if (node == null){ 6 return; 7 } 8 reversePrint(node.next); 9 ... 阅读全文
posted @ 2018-12-01 22:54 Mr.van_Gogh 阅读(495) 评论(0) 推荐(0) 编辑
摘要: 1 public class Main { 2 3 // 就地逆序法 4 public Node reverse(Node head) { 5 // no need to reverse 6 if (head == null || head.next == null || head.next.next == null) { 7 ... 阅读全文
posted @ 2018-12-01 22:22 Mr.van_Gogh 阅读(3270) 评论(0) 推荐(0) 编辑