07 2021 档案
摘要:查看10分钟内的日志 #!/bin/bash cd /opt/xxx/log logname=$(find -cmin -10) tail -f $logname
阅读全文
摘要:初始化一个类 经典案例 public class Singleton { private static Singleton instance = new Singleton(); public static Singleton getInstance() { return instance; } p
阅读全文
摘要:// json字符串 "Bottom": [ { "ID": 1425, "name": "name1" }, { "ID": 1426, "name": "name2" } ]}` // 核心方法利用reflect.Typeof(mm).Kind() // 利用反射先遍历slice的值,再进行类型
阅读全文
摘要:vim ifcfg-ens33 // 做以下操作: // 修改: BOOTPROTO=static ONBOOT=yes // 增加: IPADDR=192.168.110.155 GATEWAY=192.168.110.2 -- 网关 DNS1=192.168.110.2 --与网关一致 // 重
阅读全文
摘要:拒绝count(*),然后判断是否>0 Sql: SELECT 1 FROM table WHERE id = 1 AND age = 2 LIMIT 1 Java写法: Integer exist = xxDao.existXxxxByXxx(params); if ( exist != NULL
阅读全文
摘要:nginx部署项目出现错误net::ERR_HTTP2_PROTOCOL_ERROR 200 第一时间应该查看nginx的error.log然后排查错误
阅读全文
摘要:@echo off rem 计算指定天数之前的日期 set DaysAgo=2 call :DateToDays %date:~0,4% %date:~5,2% %date:~8,2% PassDays set /a PassDays-=%DaysAgo% call :DaysToDate %Pas
阅读全文
摘要:https://www.cnblogs.com/Zeros/p/6957424.html
阅读全文
摘要:源码 https://github.com/axgle/mahonia 场景:修改utf-16的xml // 假设有一个uft-16的xml distFilePath := "utf16.xml" fArr, err := ioutil.ReadFile(distFilePath) if err !
阅读全文
摘要:defer是延迟执行。如果存在多个defer,运行顺序是先进后出,属于堆栈结构 f, err := os.Create(fileName) if err != nil { fmt.Println("Create file failed:", err) return nil, err } defer
阅读全文

浙公网安备 33010602011771号