在VS Code编辑C/C++文件时,Alt+Shift+F 快捷键会默认使用拓展C/C++进行文档格式化

查看C_Cpp.formatting@ext:ms-vscode.cpptools这一配置项,发现VS Code默认使用clang-format进行格式化

Coding style, currently supports: Visual Studio, LLVM, Google, Chromium, Mozilla, WebKit, Microsoft, GNU. Use file to load the style from a .clang-format file in the current or parent directory, or use file:<path>/.clang-format to reference a specific path.

查询文档Clang-Format Style Options — Clang 20.0.0git documentation得知

阅读全文 »

每次生成一个新密钥

1
ssh-keygen -t ed25519 -C "your_email@example.com"

添加config

  1. 打开~/.ssh/config,追加内容:

    1
    2
    3
    4
    5
    Host something
    User root
    Hostname example.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_rsa_or_your_file_name
  2. ssh-agent开下来

    1
    ssh-agent -s
  3. 把新key加到ssh里面

    1
    ssh-add ~/.ssh/id_rsa_or_your_file_name

设置远程authorized_keys

  1. 登到远程服务器
  2. 去往~/.ssh/authorized_keys
  3. 把对应的.pub文件里的东西(一行)粘进去,保存
阅读全文 »


学在浙大其实是由两部分组成的,其一为 courses.zju.edu.cn,它叫wangxin ,其二为 course.zju.edu.cn, 它叫zju_web; 两部分用的登录流程也不一样,所以,当你点击“进入平台”时,你实际上又走了一遍统一身份认证,换言之,即使你看到了“进入平台”按钮,如果你的 zjuam 状态掉了,你还是会被跳到登录界面;当然,这也意味着你不用先点一下“统一身份认证登录”再点一下“进入平台”; 学在浙大用的外包系统是 Tronclass ; 其实,这里还有第三个域名:identity.zju.edu.cn。你可能从未用过“校外人员登录”这个功能,但是,如果你点击了,那么你将进入这个域名下。 等等,我单击了...
阅读全文 »

你无敌了PTA

有的时候,实际的裁判程序可能与题干所写的裁判程序有所不同,你可以通过这种方式获得实际的裁判程序。

阅读全文 »
0%