Centos 9 中安装 php 7.4
dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module list php
dnf install php74-php php74-php-fpm php74-php-mysqlnd php74-php-mcrypt php74-php-gd php74-php-bcmath php74-php-json php74-php-mbstring php74-php-xml php74-php-zip
systemctl enable php74-php-fpm
# /etc/opt/remi/php74/php.ini
# /etc/opt/remi/php74/php-fpm.conf
# 检查依赖是否完整...
注意文件编码!UTF-8 乱码的话换 GB18030/GBK/GB2312
#NoEnv
#SingleInstance force
!a::Send ^a ; 将 Alt+A 设置为全选
!x::Send ^x ; 将 Alt+X 设置为剪切
!c::Send ^c ; 将 Alt+C 设置为复制
!v::Send ^v ; 将 Alt+V 设置为粘贴
!s::Send ^s ; 将 Alt+S 设置为保存
!z::Send ^z ; 将 Alt+Z 设置为撤销操作
!d::Send ^d
!f::Send ^f
!r::Send ^{F5} ; 将 Alt+R 设置为刷新界面
!t::Send ^t ; 将 Alt+T...
注:以下两个版本的区别:v2 中 #NoEnv 为默认项不用写、#If 换成了 #HotIf。置顶后窗口设为半透明(部分App自己会修改这个半透明效果为不透明但不影响置顶功能)。
AutoHotkey v2:
#SingleInstance Force
#InstallKeybdHook
global initialCapsLockState := ""
#HotIf GetKeyState("CapsLock", "P")
; 将当前窗口置顶/取消置顶
t::
initialCapsLockState := GetKeyState(&q...
介绍
validatable: 是否使用组件内置的校验
autoCorrect: min > max 时自动换位、autoCorrect:true + allowHalf:false 时可能会将 null 变为 0
allowHalf: 是否允许「一个数字、一个 null」、autoCorrect:true + allowHalf:false 时将 null 变为 0
用法
<NumberRange v-model:value="form.valueRange" />
<NumberRange v-model:value="form.valueRange" :allowHalf="false"...
macOS
Karabiner-Elements.app
建议将 cpas_lock 换为 fn,以防止与 macOS 一键打开/切换到 App(替代 Cmd + Tab) 中的按键产生冲突。
{
"description": "方向: caps_lock + h/j/k/l",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
...
有人时向某个位置发射激光
int Led = 13; // 内置的LED
int Laser = 12; // 激光头
int Sensor = 11; // 人体感应器
int enable = HIGH;
void setup() {
pinMode(Led, OUTPUT);
pinMode(Laser, OUTPUT);
pinMode(Sensor, INPUT);
}
void loop() {
digitalWrite(Led, enable ? HIGH : LOW); // 亮个灯用于指示是否在运行中
bool sensorStatus = digitalRead(Sensor);
if (enable &&...
按下亮灯,松开灭灯
int Red = 2; // 红灯
int Button = 13; // 按钮
int buttonStatus = 0;
void setup() {
pinMode(Red, OUTPUT);
pinMode(Button, INPUT_PULLUP);
}
void loop() {
buttonStatus = digitalRead(Button);
// 按下亮灯,松开灭灯
if (buttonStatus == HIGH) {
digitalWrite(Red, HIGH);
} else {
digitalWrite(Red, LOW);
}
}
按一下亮,再按来,依次循环
i...
线
+: 5v
-: GND
S: pin 9
示例
int Buzzer = 9; // pin 9
void setup() {
pinMode(Buzzer, OUTPUT);
}
void loop() {
tone(Buzzer, 1000); // 发出 1000hz 的声音
delay(1000);
noTone(Buzzer); // 关闭声音
delay(1000);
}
代码
int Buzzer = 9; // pin 9
int music[][2] = {
{ 392, 125 }, // [音调, 时长]
{ 392, 125 },
{ 440, 250 },
{ 392, 250 },
{ 532...
导出
let data = JSON.stringify(localStorage, null, 2);
let blob = new Blob([data], {type: "text/plain;charset=utf-8"});
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.download = 'LocalStorage_' + new Date().toISOString().replace(/[^0-9a-z]/ig, '') + '.txt';
link.click(...
绿灯风停,红灯刮风,红绿间隙黄灯。
int Red = 13; // 红灯
int Yellow = 12; // 黄灯
int Green = 11; // 绿灯
int FanA = 8; // 风扇 VINA
int FanB = 9; // 风扇 VINB
void setup() {
pinMode(FanA, OUTPUT);
pinMode(FanB, OUTPUT);
pinMode(Red, OUTPUT);
pinMode(Yellow, OUTPUT);
pinMode(Green, OUTPUT);
}
void loop() {
// 绿灯亮
digitalWrite(Green, HIGH);
...
void setup() {
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
digitalWrite(8, LOW );
digitalWrite(9, HIGH);
}
void loop() {
}
对齐:用 style=”text-align:center” 属性代替 quill 的 class=”ql-align-center” 版对齐功能
import Quill from 'quill';
const QuillAlign = Quill.import('attributors/style/align');
QuillAlign.whitelist = ['right', 'center', 'justify'];
Quill.register(QuillAlign, true);
字号:用 style=”font-size:18px;” 代...