容器时区问题

容器->对应容器->编辑->环境变量
增加以下内容

1
TZ=Asia/Shanghai

重启容器

2024

6月

《超级自控力-如何有效地自我管理》 一龙

自控力是成功的基本要素,自控力强的人能够更好地控制自己的注意力、情绪、欲望、习惯和行为。

Sourcetree使用ssh后出现 The server’s host key is not cached in the registry问题的解决办法

SourceTree->工具->选项->一般->SSH客户端
从PuTTY/Plink修改为OpenSSH

空格占位符

  •   == 普通的英文半角空格

  •   ==   ==   == no-break space (普通的英文半角空格但不换行)

  •   == 中文全角空格 (一个中文宽度)

  •   ==   == en空格 (半个中文宽度)

  •   ==   == em空格 (一个中文宽度)

  •   == 四分之一em空格 (四分之一中文宽度)

Java

Sting.equals

equals方法使用时把对比值放前面
如:

1
"1".equals(name)

Spring Boot

docker部署时问题

国际化配置获取

1
ResourceBundle.getBundle("international.message", Locale.getDefault())
1
ResourceBundle.getBundle("international.message", Locale.China)

nvm镜像配置

1
nvm node_mirror https://npmmirror.com/mirrors/node/
1
nvm npm_mirror https://npmmirror.com/mirrors/npm/

常见问题

npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。

使用nvm 安装node时注意如果提示以下信息就是网络不好,需要配置代理或者镜像

1
2
3
4
Downloading node.js version 12.22.0 (64-bit)...
Complete
Downloading npm version 6.14.11... Error while downloading https://github.com/npm/cli/archive/v6.14.11.zip - Get "https://github.com/npm/cli/archive/v6.14.11.zip": dial tcp 20.205.243.166:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Please visit https://github.com/npm/cli/releases/tag/v6.14.11 to download npm.

快速新增 API、组件,调整组件属性

例如:在支付宝小程序中移除enableNative属性

1
2
3
4
5
6
7
8
9
10
[
"@tarojs/plugin-inject",
{
components: {
Input: {
enableNative: "",
},
},
},
]

使用@tarojs/plugin-inject插件

参考文章https://taro-docs.jd.com/docs/platform-plugin/

页面跳转对象传参

A->B

A页面

1
2
3
Taro.preload()
Taro.navigateTo()

B页面

1
console.log(Taro.getCurrentInstance().preloadData)