原创 C++:map.insert插入重複鍵(已存在鍵)將忽略,而非值覆蓋

C++:map.insert插入重複鍵(已存在鍵)將忽略,而非值覆蓋 測試代碼: #include <iostream> #include <map> using namespace std; int main() {

原创 C:strerror(或 inet_ntoa) 返回值默認整型截斷導致進程核心轉儲 core dumped

C:strerror(或 inet_ntoa) 返回值默認整型截斷導致進程核心轉儲 core dumped 測試環境: [test1280@localhost ~]$ uname -a Linux localhost.locald

原创 openapi:swagger-ui/swagger-editor 部署

openapi:搭建部署 swagger-ui/swagger-editor 主機環境:Centos 7.2 [root@test1280 ~]# cat /etc/redhat-release CentOS Linux re

原创 openssl: 兼容openssl1.1.0及舊版本

openssl: 兼容openssl1.1.0及舊版本 openssl 1.1.0+ 版本和低版本有很多接口不兼容問題,例如: openssl 1.1.0+ 版本中,很多 struct 是不透明的,不能在棧中直接聲明變量,需要通過

原创 CentOS 8:Vmware Section %packages does not end with a %end

CentOS 8:Vmware Section %packages does not end with a %end VMWARE版本: 產品:VMware® Workstation 14 Pro 版本:14.1.3 build

原创 Lua:大小寫不敏感引用table鍵及遞歸設置元表

Lua:大小寫不敏感引用table鍵及遞歸設置元表 Lua中table的鍵是區分大小寫的,即: local t = {} t.a = "a" print(t.A) -- nil 有時候希望可以大小寫不敏感地訪問、引用table的

原创 golang: panic: crypto: requested hash function #2 is unavailable

golang: panic: crypto: requested hash function #2 is unavailable Code: package main import ( "crypto" "fmt" "io

原创 openssl: error: storage size of ‘ctx’ isn’t known

openssl: error: storage size of ‘ctx’ isn’t known 問題 Code: #include <stdio.h> #include <stdlib.h> #include <unistd.

原创 openssl: HMAC算法實現樣例

openssl: HMAC算法實現樣例 算法實現樣例: HMAC-SHA1 HMAC-SHA224 HMAC-SHA256 HMAC-SHA384 HMAC-SHA512 HMAC-MD5 Code: #include <st

原创 Linux: sysctl 命令

Linux: sysctl 命令 sysctl 命令用於運行時配置系統內核參數。 常用參數:sysctl -a | -p | -w 關聯man手冊: man sysctl man sysctl.conf 關聯文件(目錄): /p

原创 openssl:獲取openssl版本號

openssl:獲取openssl版本號 一、代碼 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <openssl/opensslv.h>

原创 golang:MD5的幾種實現方式

golang:MD5的幾種實現方式 package main import ( "crypto" "crypto/md5" "fmt" "io" ) func main() { { h := crypto.MD5

原创 Linux:iptables 常用命令(及開放主機80端口)

Linux:iptables 常用命令 主機環境: [root@test1280 ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@test1280 ~]#

原创 加解密:基於 openssl 實現 des ede3 cbc pkcs#5 算法

加解密:基於 openssl 實現 des ede3 cbc pkcs#5 算法 Code: #include <stdio.h> #include <stdlib.h> #include <openssl/evp.h> #inc

原创 goland (IDEA) 取消拼寫檢查

goland (IDEA) 取消拼寫檢查 默認情況下,IDEA會幫助我們檢查不規範的拼寫,標記出潛在的問題,例如: 可以通過設置IDEA,達到取消拼寫檢查的目的,如下: 強迫症的我表示很舒服。 參考: 1.https://w