background picture of the home page

Hi,Friend

爱睡懒觉的程序员

Linux中使用 screen 实现命令后台执行

在 Linux 中执行一个长时间运行的任务(比如训练模型、下载数据等)时,如果关闭终端,任务也会被强制中断。这时候就可以用 screen 工具,让命令在“后台窗口”中继续运行,哪怕你关闭了终端或掉线也不会受影响。 示例:保持训练任务在后台运行 screen -S train_model 然后在新窗口

thumbnail of the cover of the post

使用 sysbench 进行 MySQL 压测

首先使用 Docker 拉取 sysbench 的镜像: docker pull severalnines/sysbench 然后需要初始化数据,自动在指定的数据库(test)中创建一些测试表。docker run --rm 命令会在在容器退出后自动删除容器,不会占用空间。 sudo docker

thumbnail of the cover of the post

SpringBoot 面试题

什么是 DTO、DAO、DO? DAO(Data Access Object)数据库操作层的类,封装了增删改查的操作。 DO(Data Object)数据模型层,对应着数据库中表的结构。 DTO(Data Transfer Object)用于数据传输的对象,一般用于 controller 和 ser

thumbnail of the cover of the post

题型:回溯

回溯入门 17. 电话号码的字母组合 给定一个仅包含数字 2-9 的字符串,返回所有它能表示的字母组合。答案可以按 任意顺序 返回。 给出数字到字母的映射如下(与电话按

thumbnail of the cover of the post

题型:单调栈

739. 每日温度 public int[] dailyTemperatures(int[] temperatures) { Deque<Integer> st = new ArrayDeque<>(); int n = temperatures.length; int[]

thumbnail of the cover of the post

RTMP

什么是RTMP协议? RTMP(Real Time Messaging Protocol)即实时消息传输协议。 它是一种应用层网络协议,主要用于在互联网上进行音频、视频和数据的实时传输。RTMP 具有低延迟、高效传输等特点,被广泛应用于直播、视频会议、在线教育等领域。 该协议在流媒体传输方面发挥了重

thumbnail of the cover of the post

HOT100:链表

19 相交链表 ⭐ 链表中的经典题 当我在我的路上走过一遍依然没有遇见你时,那么我会接着来到你走过的路走一遍,而你如果也和我一样心有灵犀,那么总有一天我们将在合适的时候相遇。 public ListNode getIntersectionNode(ListNode headA, ListNode h

thumbnail of the cover of the post

手写数据结构:堆

堆是一种满足特定条件的完全二叉树,可以分为两种: 最小堆:任意节点的值 \le 其子节点的值。 最大堆:任意节点的值 \ge 其子节点的值。 一、堆的实现 1.1 堆存储与表示 完全二叉树非常适合用数组表示给定索引 i,左子节点的索引为

thumbnail of the cover of the post

HOT100:二叉树

33 二叉树的中序遍历 中序遍历是先左子树,再根节点,最后是右节点的顺序。递归的写法比较直观: List<Integer> ans = new ArrayList<>(); public List<Integer> inorderTraversal(TreeNode root) { dfs

thumbnail of the cover of the post