安装 sudo apt-get install aria2 配置 mkdir /etc/aria2 #新建文件夹 touch /etc/aria2/aria2.session #新建session文件
chmod 777 /etc/aria2/aria2.session #设置aria2.session可写 vim /etc/aria2/aria2.conf #创建配置文件 aria2.conf:
## 全局设置 ## ============================================================
# 日志
#log-level=warn
#log=/PATH/.aria2/aria2.log
# 后台运行
#daemon=true
# 下载位置, 默认: 当前启动位置
dir=/home/Aria2/Downloads/
# 从会话文件中读取下载任务 都用绝对路径
input-file=/etc/aria2/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
save-session=/etc/aria2/aria2.session
# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
save-session-interval=30
# 断点续传
continue=true
# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
#disk-cache=32M
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
# 预分配所需时间: none < falloc ? trunc < prealloc
# falloc和trunc则需要文件系统和内核支持
# NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项
file-allocation=none
# 客户端伪装
user-agent=netdisk;5.
参考https://github.com/kholia/OSX-KVM 拷贝备份仓库https://gitee.com/y141111/OSX-KVM
更新软件源 sudo apt-get update 环境要求 A modern Linux distribution. E.g. Ubuntu 22.04 LTS 64-bit or later. QEMU >= 6.2.0 A CPU with Intel VT-x / AMD SVM support is required (grep -e vmx -e svm /proc/cpuinfo) A CPU with SSE4.1 support is required for >= macOS Sierra A CPU with AVX2 support is required for >= macOS Mojave python3软连接到python sudo ln -s /usr/bin/python3.8 /usr/bin/python 如果已存在则先删除在创建
sudo rm /usr/bin/python 安装需要的软件包 安装 QEMU 和其他软件包。 sudo apt-get install qemu uml-utilities virt-manager git \
wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
tesseract-ocr-eng genisoimage -y 克隆OSX-KVM代码(macOS运行的虚拟机) 首先进入当前用户目录下 cd ~ 然后克隆仓库代码 国外(二选一)
// 创建登录按钮
JButton loginButton = new JButton("login");
loginButton.setBounds(10, 80, 80, 25);
// 添加按钮的点击事件监听器
loginButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
// 获取到的事件源就是按钮本身
// JButton btn = (JButton) e.getSource();
System.out.println("按钮被点击");
}
});
panel.add(loginButton);
package com.okk.hextostring;/*
* ┏┓ ┏┓ + +
* ┏━┛┻━━━━━┛┻━┓ + +
* ┃ ┃ + + +
* ┃ ━ ┃ + + + +
* ████━████ ┃ + + +
* ┃ ┃ + +
* ┃ ━┻ ┃ +
* ┃ ┃ +
* ┗━━┓ ┏━━┛ +
* ┃ ┃ + + + +
* ┃ ┃ + + + + + + + +
* ┃ ┃ + Code is far away from bug with the animal protecting
* ┃ ┃ + 神兽保佑,代码无bug
* ┃ ┃ + @author shy @date:2020-12-12 15:43
* ┃ ┃ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* ┃ ┗━━━━━━━━━┓ +
* ┃ ┣━┓ +
* ┃ ┏━┛ + +
* ┗━┓ ┓ ┏━━┳ ┓ ┏━━┛ + +
* ┃ ┫ ┫ ┃ ┫ ┫ + +
* ┗━┻━┛ ┗━┻━┛ +
*/
import javax.
<RadioGroup
android:id="@+id/rg_1"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal">
<RadioButton
android:id="@+id/btn_1"
android:text="@string/form_map"
android:checked="true"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:button="@null"
android:textSize="0sp"
android:drawableTop="@drawable/radio_button"/>
Android 隐藏状态栏,导航栏,但是触碰屏幕会显示导航栏 kotlin:
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN 解决办法,想到两个(重写触摸事件,返回true||添加一个View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) 第二个解决办法
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY