DecimalFormat

DecimalFormat 我们经常要将数字进行格式化,比如取2位小数,这是最常见的。Java 提供 DecimalFormat类,帮你用最快的速度将数字格式化为你需要的

霍桑效应

霍桑效应 20 年代时,在芝加哥郊外一个名为"霍桑"的工厂里,研究人员在研究照明条件对工人绩效表现的影响。研究人员最初认为,随

SSL 故障分析

SSL 故障分析 1 2 3 4 5 6 7 8 openssl s_client -connect host0:port0 2>&1 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' openssl verify foo.pem openssl s_client -connect host0:port0 -state -showcerts 解码根证书 openssl x509 -text -in roch.pem https://www.ibm.com/developerworks/cn/linux/l-cn-sclient/index.html

clonezill

clonezill download clonezill iso from https://clonezilla.org/downloads.php install balenaEtcher 1 dd bs=1M conv=fdatasync if=./clonezilla-live-3.2.0-5-amd64.iso of=/dev/sdx 1 2 3 4 5 6 7 8 9 start clonezilla device-image nfs_server dhcp nfs4 192.168.50.227 /backup_xxxx/ beginner save parts clonezill https://clonezilla.org/ https://clonezilla.org/liveusb.php#macos-setup Download the Clonezilla Live iso file. Insert a USB flash drive on the Mac machine. Erase it using the standard Mac Disk Utility (exFAT works fine). Download balenaEtcher for macOS, then follow its

diffie-hellman

diffie-hellman 1 openssl dhparam -out dhparam.pem 2048 # 如果你的机器性能足够强大,可以用 4096 位加密

idea 快捷键, keymap

idea 快捷键, keymap alt + shift + up, move line up Key Command ctrl+g line/column ctrl+t Class… ctrl+] move caret to code block end ctrl+alt=b Go to Implementation(s), 接口的实现类

MySQL dml

MySQL dml DML 1 2 3 iNSERT INTO table_name ( field1, field2,...fieldN ) VALUES ( value1, value2,...valueN ); https://blog.51cto.com/lustlost/1224775

google authenticator databases

google authenticator databases https://eduncan911.com/technology/hardware/google-authenticator-databases-move-copy-fix.html /data/data/com.google.android.apps.authenticator2/databases/databases

google domain, invalid City

google domain, invalid City 填写联系人资料的时候国家选择中国,填写城市 的时候要写成 Dalian Shi Google Domain 填写出错 http://www.flaskfox.com/2015/11/16/google-domain-%e5%a1%ab%e5%86%99%e5%87%ba%e9%94%99/embed/#?secret=2UAujlnd36

intellij idea 配置 git ssh key

intellij idea 配置git ssh key 把私钥放入目录 C:\Users\user0\.ssh, 私钥不需要转换成 ppk 格式. https://blog.csdn.net/u010348570/article/details/81204371 1 安装git,登录官网https://www.git-scm.com/downl

archlinux ip forward, ip_forward

archlinux ip forward, ip_forward 开启数据包转发 1 2 3 4 5 vim /etc/sysctl.d/30-ipforward.conf net.ipv4.ip_forward=1 net.ipv6.conf.default.forwarding=1 net.ipv6.conf.all.forwarding=1 1 sysctl -a |grep net.ipv4.ip_forward 配置 nftables 的转发规则 nftables 默认在 forward 链抛掉所有数据。 如果启用了 nftables, 一定修改一下 nftables 的默认配置文件。否则

diff command

diff command diff 的三种格式 正常格式 上下文格式 合并格式 git 格式 Git’s diff is a variant of unified diff, so unified diff is preferred. 1 2 # unified diff diff -u foo bar diff 是 Unix 系统的一个很重要的工具程序。它用来比较两个

redis config redis 配置

redis config redis 配置 sample, 单机 redis server 配置 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

nodejs basic

nodejs basic version current v14.21.3 latest v21.6.2 nvm, Node Version Manager https://github.com/nvm-sh/nvm 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # macos install nvm brew install nvm # ubuntu 24.04 install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash # archlinux install nvm pacman -S nvm # Due to the way nvm is designed, you have to source it before you can

kde idea 图标消失

kde idea 图标消失 Open folder /home/USERNAME/.local/share/applications/ Find jetbrains-idea.desktop Right mouse click on it, then select Properties Open Application tab Next to the Command section click Browse… button and select idea.sh file in /pathToIntelliJ/bin folder. (In my case the path was already correct, but it seems that selection the file again rewrite something and Icon works ok now). Click OK. https://stackoverflow.com/questions/43706663/intellij-idea-lost-icon-after-launch

idea install

idea install default plugins build tool ant - disable maven gradle version control cvs - disable mercurial - disable git subversion github test tools junit testng-j - disable swing - disable android - disable othre tools plugin development - disable