【Python】更新全部Python包

摘要: pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U 旧的版本 pip freeze --local | grep -v '^\-e' | cut -d = -f 阅读全文
posted @ 2021-03-09 17:27 严中辉 阅读(95) 评论(0) 推荐(0)

【Android】常用的ADB命令

摘要: 开发者官网:Android 调试桥 设置目标设备以侦听端口 5555 上的 TCP/IP 连接。 $ adb tcpip 5555 连接至设备,通过 IP 地址识别此设备。 $ adb connect device_ip_address 查询设备 $ adb devices List of devi 阅读全文
posted @ 2021-01-11 17:31 严中辉 阅读(163) 评论(0) 推荐(0)

【Android】getLastKnownLocation返回null

摘要: android - getLastKnownLocation returns null - Stack Overflow LocationManager mLocationManager; Location myLocation = getLastKnownLocation(); private L 阅读全文
posted @ 2021-01-11 17:27 严中辉 阅读(765) 评论(0) 推荐(0)

面向对象设计模式之单例模式

摘要: 单例对象的类必须保证只有一个实例存在。 饿汉模式 /** * 饿汉模式 */ public class HungrySingleton { private static final HungrySingleton INSTANCE = new HungrySingleton(); private H 阅读全文
posted @ 2021-01-11 16:09 严中辉 阅读(97) 评论(0) 推荐(0)

【Android】打包apk输出自定义文件名称

摘要: android { ...... buildTypes { ...... android.applicationVariants.all { variant -> variant.outputs.all { outputFileName = "name_v${variant.versionName} 阅读全文
posted @ 2020-12-29 09:05 严中辉 阅读(177) 评论(0) 推荐(0)

【Raspberry Pi】Wiring Pi无法读取树莓派4B GPIO(Oops - unable to determine board type... model: 17)

摘要: Oops - unable to determine board type... model: 17 $ sudo apt-get install wiringpi Reading package lists... Done Building dependency tree Reading stat 阅读全文
posted @ 2020-08-23 12:32 严中辉 阅读(1733) 评论(0) 推荐(0)

【Android】软键盘遮挡布局的解决办法

摘要: AndroidBug5497Workaround.class public class AndroidBug5497Workaround { // For more information, see https://issuetracker.google.com/issues/36911528 // 阅读全文
posted @ 2020-08-18 08:24 严中辉 阅读(336) 评论(0) 推荐(0)

【Raspberry Pi】树莓派(在SD卡上创建映像后)WiFi网络和SSH的设置

摘要: WiFi网络设置,在SD卡(boot)下创建一个wpa_supplicant.conf文件,示例如下: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=CN network={ ssid= 阅读全文
posted @ 2020-08-13 22:31 严中辉 阅读(508) 评论(4) 推荐(0)

【Raspberry Pi】树莓派查看GPU和ARM CPU的温度

摘要: $ vi my-pi-temp.sh $ cat my-pi-temp.sh #!/bin/bash # Script: my-pi-temp.sh # Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3 # Au 阅读全文
posted @ 2020-08-11 15:37 严中辉 阅读(969) 评论(1) 推荐(0)

【FRP】frp配置信息

摘要: 服务端 $ cat frps.ini [common] bind_port = 7000 vhost_http_port = 80 vhost_https_port = 443 客户端 $ cat frpc.ini [common] server_addr = example.com server_ 阅读全文
posted @ 2020-08-11 15:26 严中辉 阅读(150) 评论(0) 推荐(0)