摘要: E. Prefix GCD 假设我们从一个空集合\(b\)开始,不断从\(a\)数组中选择一个元素添加到\(b\)集合的尾部,当把\(a\)数组的元素全部添加到\(b\)中后,得到的\(b\)即为所求的rearrange后的\(a\)。 结论1: 每次选择使得其和当前\(b\)中所有元素的最大公约数 阅读全文
posted @ 2024-09-27 20:41 lightmon 阅读(118) 评论(0) 推荐(0)
摘要: 在/etc/default/grub中给GRUB_CMDLINE_LINUX_DEFAULT 添加参数: acpi_osi='!Windows 2012' 然后使用命令重新生成grub配置: grub-mkconfig -o /boot/grub/grub.cfg 重启即可 阅读全文
posted @ 2024-09-15 21:38 lightmon 阅读(75) 评论(0) 推荐(0)
摘要: 很有可能你同时装了Hyprland和KDE plasma两种桌面环境,其中一个用pipewire作为音频管理器,另一个用pulseaudio作为音频管理器,这两者会发生冲突,导致奇怪的音频问题出现。 解决方案: 安装pipewire-pulse以替换掉pulseaudio, 解决音频管理器的冲突即可 阅读全文
posted @ 2024-09-14 00:23 lightmon 阅读(317) 评论(0) 推荐(0)
摘要: 本指南将介绍如何不借用archinstall脚本来安装纯命令行界面的ArchLinux到64位系统上。(UEFI+GPT) 零、安装前准备 首先当然是先进入liveiso环境。 增大字号: setfont ter-132n 测试网络连接是否顺畅: ping archlinux.org -c 5 验证 阅读全文
posted @ 2024-09-12 18:06 lightmon 阅读(533) 评论(0) 推荐(0)
摘要: sudo pacman-key --refresh-keys # enable ntp and ensure the time correct timedatectl set-ntp 1 timedatectl status rm -fr /etc/pacman.d/gnupg # create p 阅读全文
posted @ 2024-09-04 23:21 lightmon 阅读(273) 评论(0) 推荐(0)
摘要: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass 阅读全文
posted @ 2024-07-28 22:24 lightmon 阅读(153) 评论(0) 推荐(0)
摘要: 目的 把当前文件夹下的这些文件 重命名为 代码 Get-ChildItem -Path . -Filter "*.mkv" | ForEach-Object { if ($_.Name -ne "rename") { $fileName = $_.Name -replace "\.[^.]+$", 阅读全文
posted @ 2024-07-18 22:46 lightmon 阅读(50) 评论(0) 推荐(0)
摘要: 解决方案来自https://gist.github.com/plembo/f0767e4fbcd42c6c98f8271c15ee785d?ref=techhut.tv 首先确保宿主机开启了3d加速,并且客户机安装了vmware tools。 编辑~/.vmware/preferences 在最后加 阅读全文
posted @ 2024-07-02 18:39 lightmon 阅读(113) 评论(0) 推荐(0)
摘要: 把/usr/share/applications中的.desktop文件复制到~/.local/share/applications中修改[Exec]栏的参数即可。 阅读全文
posted @ 2024-06-18 13:19 lightmon 阅读(175) 评论(0) 推荐(0)
摘要: 文件拆分脚本 每隔两行拆分成一个新文件。 import os with open('Main.java', 'r', encoding='UTF-8') as file: file_content = file.read() file_parts = file_content.split('\n\n 阅读全文
posted @ 2024-06-17 21:42 lightmon 阅读(29) 评论(0) 推荐(0)