原创 身份證正則表達式簡要驗證

pattern="^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$"

原创 golang http timeout 圖解

http.Client Timeouts:     http.Server Timeouts:

原创 無限層級結構左右之值算法

求某節點(node)下面有多少個子孫節點 select (@node.right- @node.left -1) / 2 from tree; 求某節點(node)下面所有子孫節點 select * from tree where

原创 MYSQL遷移data目錄

mysql> show global variables like '%datadir%'  ; +---------------+-----------------+ | Variable_name | Value          

原创 解除網頁禁止鼠標右鍵

按F12,在Console中輸入 document.oncontextmenu=true; document.onselectstart=true;  

原创 Android SDK Platform-Tools (revision: 29.0.5) 下載地址

Android SDK Platform-Tools (revision: 29.0.5) 下載地址 https://dl.google.com/android/repository/platform-tools_r29.0.5-wind

原创 centos 查看防火牆是否開啓

  [root@www ~]# systemctl status iptables.service Unit iptables.service could not be found. [root@www ~]#  [root@www ~]

原创 Linux 防火牆 iptables 和 firewalld

如何安裝iptables 每個Linux內核都帶有iptables,在大多數Linux系統上,iptables安裝在 /usr/sbin/iptables 目錄中。也可以在 /sbin/iptables 中找到它。 Ubuntu和Debi

原创 linux修改系統時區

linux默認時區是GMT,如需改成北京時間,把/etc/localtime 軟連接指向Asia/Shanghai 即可   [root@www1 ~]# ll /etc/localtime lrwxrwxrwx. 1 root roo

原创 常用軟件

Bouml BOUML is a free UML 2 tool box including a modeler allowing you to specify and generate code in C++, Java, Idl, P

原创 IntelliJ IDEA 編譯報找不到符號

 在IntelliJ IDEA編譯代碼中,加入@Slf4j註解報變量log找不到符號 @Slf4j public class xx{ public void xx{   log.error("...."); }

原创 Java 和 Golang Request 信息讀取

Golang   h:= "" h+= "r.Method = " + r.Method +"\r\n" h+= "r.Host = " + r.Host +"\r\n" h+= "r.RequestURI = " + r.Reques

原创 mime type 大全

mime type 大全 { { "ez", "application/andrew-inset" }, { "aw", "application/applixware" }, { "atom", "application/ato

原创 golang 非正常退出信號捕捉處理

最近用golang寫一個P2P程序,發現在安卓(arm linux )環境下按ctrl+c退出程序,佔用udp端口不會在程序退出後自動釋放 而普通x86/x64 Linux和win 不會出現這種情況 查閱資料 可以通過捕捉信號處理。 os