·
例如: '2,430,209.12340000' => '2,430,209.1234' 方案: const str = '2,430,209.12340000' str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') 解释: 再解释下正则的意思`(?:\.0*|(\.\d+?)0+)$` `(?:reg1|reg2)` 它是一个正则分组非捕获...
XanderCheung
1649
0
0
例如: '2,430,209.12340000' => '2,430,209.1234' 方案: const str = '2,430,209.12340000' str.replace(/(?:\.0*|(\.\d+?)0+)$/, '$1') 解释: 再解释下正则的意思`(?:\.0*|(\.\d+?)0+)$` `(?:reg1|reg2)` 它是一个正则分组非捕获...
XanderCheung
1649
0
0
https://redis.io/docs/getting-started/installation/install-redis-on-linux/#install-on-ubuntudebian 安装(升级)最新版本 curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg ec...
XanderCheung
2528
0
0
https://stackoverflow.com/a/6474890/15010242 FLUSH PRIVILEGES登录 MySQL 终端时尝试该命令。如果这不起作用,请在 MySQL 终端中尝试以下命令集 mysql -u root mysql> USE mysql; mysql> UPDATE user SET password=PASSWOR...
XanderCheung
1911
0
0
从 node 6.3 版开始,Node.js 提供了一个内置的基于 DevTools 的调试器,它主要弃用了 Node Inspector,请参阅这篇博客文章以开始使用。内置调试器由 V8/Chromium 团队直接开发,并提供某些在...
XanderCheung
2079
0
0
pm2 管理 node 服务器启动https://pm2.keymetrics.io/docs/usage/quick-start/
XanderCheung
2055
0
0
官网教程:https://www.emqx.io/docs/zh/v4.4/advanced/auth-postgresql.html#postgresql-%E8%BF%9E%E6%8E%A5%E4%BF%A1%E6%81%AF 这里使用 docker 启动 emqx 和 postgresql 下文提到的 $(DOCKER_VOLUME_DIR) 请自行指定目录 启动 ...
XanderCheung
2741
0
0
Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:135:10) at module.exports (/Users/zhangxingxing/Projects/switch_data_center_vue/node_mo...
XanderCheung
16433
0
0
github 安装或更新 https://github.com/nvm-sh/nvm#install--update-script 要安装或更新nvm,您应该运行安装脚本。为此,您可以手动下载并运行脚本,或使用以下 cURL 或 Wget 命令: curl -o- https://raw.g...
XanderCheung
2729
0
0
目录仅为参考,根据实际目录做更改 配置 /home/deploy/mosquitto.conf listener 1883 persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log allow_anonymous false password_file /mosqui...
XanderCheung
4594
0
0
gorm 当使用 sql.Named 时, Where 条件生成时,没有使用括号包裹条件, 以上两种写法是两种完全不同的结果
XanderCheung
2869
0
0