avatar
文章
109
标签
41
分类
12
📝主页
📱作品
📬联系
🧑‍💻关于
👋Harry Blog
搜索
📝主页
📱作品
📬联系
🧑‍💻关于

👋Harry Blog

electron 解决socket端口被占用问题 启动socket服务,自动尝试可用接口
发表于2023-04-13|开发前端|electron
原理是本地写一个config.json,把初始端口放进去,每次启动electron的socket服务时如果发现端口被占用,就更新config.json里的端口号加1,并保存到config.json,然后退出并重启electron,直到找到可用的端口 {"port":1081} const { app, BrowserWindow, protocol, dialog } = require("electron");const path = require("path");const { Menu } = require("electron");const myMenu = require("./src/menu.js");const WebSocket = require("ws");const fs = require("fs");//wss通讯服务 let wss = {...
Electron Auto WebSocket Port Retry
发表于2023-04-13|DevelopmentFrontend|electron
Auto-increment and retry WebSocket server port in Electron when the current port is in use.
JS飞入飞出动画 加速动画 换入换出效果
发表于2023-03-14|开发前端|JS
JS飞入飞出动画 加速动画 换入换出效果 * @param elem {HTMLElement} 执行动画的HTML元素 * @param params {JSON} 动画执行过过程中需要修改的HTML属性 * @param duration {Number} 可选,动画执行时间,单位毫秒 * @param easing {String} 可选,动画执行的方式,缓入easeIn、缓出easeOut
JS Fly In Out Animation
发表于2023-03-14|DevelopmentFrontend|JS
Fly-in / fly-out JavaScript animation with easing implementation and demo.
Go Struct Field Reordering Optimization
发表于2023-03-13|DevelopmentBackend|go•struct
Improve performance and reduce memory usage by reordering struct fields for better alignment.
Go排序结构体struct中字段提升性能,降低内存使用率
发表于2023-03-13|开发后端|go•struct
将第一个struct改写为第二种可以通过排序结构体struct中字段提升性能,降低内存使用率 type BadStruct struct { age uint8 IdCardNumber uint64 DateOfBirth uint16}type GoodStruct struct { age uint8 DateOfBirth uint16 IdCardNumber uint64}
go ioutil包1.16起弃用 使用io包代替
发表于2022-11-13|开发后端|go
20 年 10 月份,Go 掌舵人 Russ Cox 已经有废弃 ioutil 包的提案[1],废弃原因是:io/ioutil, like most things with util in the name, has turned out to be a poorly defined and hard to understand collection of things. 后续的几次代码提交也证实了这一点,从 Go 1.16 开始会废弃 io/ioutil 包,相关的功能会挪到 io 包或 os 包 相关连接 https://github.com/go-critic/go-critic/issues/1019 例如 ioutil.NopCloser方法, 改为io.NopCloser方法即可
1…345…16
avatar
Harry
文章
109
标签
41
分类
12
关于
最新文章
comfyui通过Api请求报错,通过comfyui界面执行正常2025-04-18
ComfyUI workflow fails via API but succeeds in UI2025-04-18
Edit Video Duration Metadata2025-03-16
修改视频元信息时长 duration修改2025-03-16
comfyui gemeni apikey 配置2025-03-15
分类
  • Development50
    • Backend29
      • Database2
    • Frontend19
    • Tools1
  • Note3
  • 开发53
    • 前端21
    • 后端31
      • 数据库3
    • 工具1
  • 随笔3
标签
字体 java video mysql uniapp struct Vue.js jar PHP go wechat 进程/线程 MQTT electron MySQL font canvas emoji php javascript 视频 apicloud vcard comfyui 绘图 ComfyUI vue nginx Go mqtt axios git windows html Nginx ApiCloud payment python concurrency JS
归档
  • 四月 2025 2
  • 三月 2025 3
  • 十月 2024 2
  • 五月 2024 6
  • 五月 2023 2
  • 四月 2023 8
  • 三月 2023 4
  • 十一月 2022 6
© 2017 - 2025 By Harry
搜索
数据加载中