生而为人

程序员的自我修养

0%

查看jar包中是否包含某个文件

1
jar vtf analysis-tool-1.0.0-SNAPSHOT.jar application.yml

被打了一巴掌

跟警察说3句话

  1. 对方当众殴打我,事实清楚,他已经违反了治安管理处罚法,我要求依法处理,并且立刻向我出具立案的回执
  2. 我现在已经有点儿恶心,并且视线模糊,我要求立刻调取现场监控,并依法对我的伤情进行鉴定
  3. 如果我的合法诉求不被受理,那我将通过12389热线向你们上级部门进行投诉,并追究相关的不作为责任。

timestamp to date

  1. second: =(A1+8*3600)/86400+70*365+19
  2. millsecond: =(A1+8*3600)/8640000+70*365+19

date to timestamp

  1. second: =(B1-70*365-19)*86400-8*3600

ExecutionPolicy

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope MachinePolicy
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope UserPolicy
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine

Get-ExecutionPolicy -List

Set-ExecutionPolicy Bypass -Scope Process -Force; Copy-Item \cosbj-01\public\CosmosPowerShell\builds\install.ps1 $HOME\Downloads\install.ps1; & $HOME\Downloads\install.ps1 -Force

整理

查找

1
2
3
4
5
6
# 后缀名
(.*?)\.[A-Za-z0-9]+$

# 番号
.*?([A-Za-z]+)-*([0-9]+).*

替换

1
2
# 提取后转小写字母
\L$1\E

noclassdeffounderror 解决

ClassNotFoundException和NoClassDefFoundError的区别

实习杂记(27):如何解决Java.lang.NoClassDefFoundError

system.currenttimemillis() 耗时

System.currentTimeMillis的性能真有如此不堪吗?

缓慢的System.currentTimeMillis() - 疑问号

关于时间格式 2016-08-9T10:01:54.123Z 20160809100154.123Z 处理方法

编码

Base64.getMimeDecoder().decode(data)
Base64.getDecoder().decode(data);
区别

Base64 Encoding: Illegal base64 character 3c

疑问

  1. URLDecoder.decode作用
  2. 为什么不允许使用java静态构造函数