摘要: 先安装 oh my tmux: Oh my tmux C + a + c:创建一个 window C + a + 数字:切换窗口 C + a + p:切换到左边序号的窗口 C + a + n:切换到右边序号的窗口 C + a + &:杀死一个窗口 C + a + %:左右分屏 C + a + "": 阅读全文
posted @ 2023-11-18 21:37 hacker_dvd 阅读(23) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <random> #include "util.h" using namespace std; struct Point { in 阅读全文
posted @ 2023-10-29 19:39 hacker_dvd 阅读(46) 评论(0) 推荐(0)
摘要: 基础的一个 cmake 文件: cmake_minimum_required(VERSION 3.25) set(CMAKE_CXX_STANDARD 20) project(app) # 可执行文件存储目录 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_ 阅读全文
posted @ 2023-10-27 17:25 hacker_dvd 阅读(32) 评论(0) 推荐(0)
摘要: vim 清除当前行往下的所有空行:.,$g/^\s*$/d :e 文件 编辑文件 如果想快速选中一个单词(此时光标可以在单词的任意一个位置),我们只需要在 normal 模式先按下vaw(连单词后面的空格也选中)或viw(不选中单词后面的空格) 同理,如果想快速删除一个单词并重新进入编辑模式,需要按 阅读全文
posted @ 2023-10-27 16:45 hacker_dvd 阅读(30) 评论(0) 推荐(0)
摘要: # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. expor 阅读全文
posted @ 2023-10-24 16:13 hacker_dvd 阅读(34) 评论(0) 推荐(0)
摘要: debian 设置镜像源 在 /etc/apt/sources.list 下将原来的内容删去,然后改为如下内容(清华镜像源) deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-fre 阅读全文
posted @ 2023-10-23 19:15 hacker_dvd 阅读(38) 评论(0) 推荐(0)
摘要: 参考:指针声明 常量指针 (Pointer to Constant) 定义:一个指向常量的指针。这意味着指针指向的值不能被修改,但指针本身可以被修改,即可以重新指向其他地址。 声明:const Type* pointerName; const int* p1; int x = 10, y = 20; 阅读全文
posted @ 2023-10-21 20:10 hacker_dvd 阅读(26) 评论(0) 推荐(0)
摘要: 参考:默认实参 #include <iostream> void f(int a, int b = 1); // 只要前面声明了 b 的值,后面 b 可以不给默认值 void f(int a = 2, int b) { std::cout << a << ' ' << b << '\n'; } in 阅读全文
posted @ 2023-10-21 18:45 hacker_dvd 阅读(18) 评论(0) 推荐(0)
摘要: 先在本地windows 环境下安装好 ssh,然后用 ssh-keygen -t rsa -C "xxx@xxx.com"生成密钥 在服务器上也使用ssh-keygen -t rsa -C "xxx@xxx.com"生成密钥 将本地的公钥传递到服务器:scp .\id_rsa.pub lc@47.1 阅读全文
posted @ 2023-10-21 15:37 hacker_dvd 阅读(91) 评论(0) 推荐(0)
摘要: #include <dirent.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #includ 阅读全文
posted @ 2023-10-10 14:18 hacker_dvd 阅读(50) 评论(0) 推荐(0)