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 # 检查依赖是否完整...
2012/07/9 浏览数(11,117) 分类(CentOS/RockyLinux, Linux, 数据安全)
有人时向某个位置发射激光 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 &&...
2025/03/1 浏览数(53) 分类(Arduino)
按下亮灯,松开灭灯 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...
2025/03/1 浏览数(64) 分类(Arduino)
线 +: 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, 250 }, { 4...
2025/03/1 浏览数(63) 分类(Arduino)
导出 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(); link.r...
2025/02/14 浏览数(93) 分类(Javascript)
绿灯风停,红灯刮风,红绿间隙黄灯。 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); ...
2025/01/12 浏览数(101) 分类(Arduino)
void setup() { pinMode(8, OUTPUT); pinMode(9, OUTPUT); digitalWrite(8, LOW ); digitalWrite(9, HIGH); } void loop() { }
2025/01/12 浏览数(97) 分类(Arduino)
对齐:用 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;” 代替 qu...
2024/08/10 浏览数(137) 分类(Javascript)
目标 将对象的所有 key 配置给 watch 代码 const ImageableFields = [ 'cover', 'detail', 'reply', ]; // 转换为 FormItem.prop: cover -> form._images_cover const WatchableFields = ImageableFields.ma(v => `form._images_${v}`); export default { props: { detail: { type: Object, default: () => ({}), }, }, data() { ...
2024/08/10 浏览数(167) 分类(Vue.js)
问题描述 数据库字段类型为 datetime,faker 格式为 Y-m-d H:i:s,factory::make() 出来的也是 Y-m-d H:i:s,但是 toArray() 之后变成了 c,c 类似 2024-01-02T03:04:05.000000Z。insert(c) 时候报了标题的信息。 解决方法 方法1: # /config/database.php 'mysql' => [ 'strict' => false, // true 改为 false ], 方法2: # /app/Models/User.php protected $casts = [ 'created_...
2024/02/7 浏览数(658) 分类(Laravel)
适用版本: frp_0.52.3 服务端 frps.toml bindPort = 7000 auth.token = "TOKEN" log.to = "/var/log/frp/log" allowPorts = [ { single = 3389 }, { start = 9000, end = 9999 } ] webServer.addr = "0.0.0.0" webServer.port = 7500 webServer.user = "man" webServer.password = "srcret" 添加为服务 /etc/systemd/system/frpd.service [Unit] Desc...
2023/12/19 浏览数(742) 分类(操作系统)
点击返回顶部
  1. 留言
  2. 联系方式