background picture of the home page

Hi,Friend

爱睡懒觉的程序员

Ubuntu 服务器常见问题

nvidia-smi 失效 驱动问题,首先检查推荐的驱动版本: sudo ubuntu-drivers devices 如果显示 ubuntu-drivers 命令不存在,则先进行安装: sudo apt install ubuntu-drivers-common 安装完成之后再次执行命令,得到如下

thumbnail of the cover of the post

Docker 笔记:网络

容器间的网络 笔者在使用 Docker 创建 XXL-Job 时无法连接之前已经创建的 MySQL 容器。查询相关资料才发现: Docker 容器默认被分配在 bridge 网络下 bridge 网络下的容器之间无法使用容器名称相互访问,需要指定具体的 IP 地址,但是 IP 是动态分配的,每次重启

thumbnail of the cover of the post

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

题型:回溯

回溯入门 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