golang sync.Map

“golang sync.Map” 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 func main() { m := sync.Map{} m.Store(1,1) go do(m) go do(m) time.Sleep(1*time.Second) fmt.Println(m.Load(1)) } func do (m sync.Map) { i := 0 for i < 10000 { m.Store(1,1) i++ } } 清空 sync.Map https://stackoverflow.com/questions/49355345/how-to-clean-a-sync-map 1 2 //erase map: A zero sync.Map is empty and ready for use. map2 = sync.Map{}

golang 正则

“golang 正则” https://studygolang.com/articles/7256 func main() { fmt.Println(regexp.Match("H.* ", []byte("Hello World!"))) // true }

http method, get, head, post, options, put, delte, trace, connect

“http method, get, head, post, options, put, delete, trace, connect” https://www.cnblogs.com/machao/p/5788425.html HTTP Method 的历史: HTTP 0.9 这个版本只有 GET 方法 HTTP 1.0 这个版本有 GET HEAD POST 这三个方法 HTTP 1.1 这个版本是当前版本,包含 GET HEAD POST OPTIONS PUT DELETE TRACE CONNECT 这 8 个方法

hugo, envoy, github actions

“hugo, envoy, github actions” install 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 sudo pacman -S hugo hugo new site quickstart cd quickstart git init git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke echo theme = \"ananke\" >> config.toml hugo new posts/my-first-post.md hugo server -D hugo new site wiloon.com cd wiloon.com git init git clone https://github.com/olOwOlo/hugo-theme-even themes/even cp themes/even/exampleSite/config.toml config.toml hugo new post/my-first-post.md

icebox

“icebox” 先用adb安装 谷歌版冰箱激活 Root方法: 把冰箱apk放到 /data/local/tmp/ 文件夹中,然后为方便起见重命名为icebox.apk 然后打开终端,su后输入 pm

Infinitive 不定式

Infinitive 不定式 动词不定式一般是由“to + 动词原形”构成,还需要注意得是,这里的 to 是动词不定式的一部分,不做介词使用。举几个动词不定式的例子: to be to

iperf3 测速

iperf3 测速 install 1 2 3 4 5 6 7 8 # centos yum install iperf3 # openwrt opkg install iperf3 #ubuntu apt-get install iperf3 windows https://iperf.fr/iperf-download.php#windows command server 1 iperf3 -s client 1 2 3 4 iperf3 -c 192.168.50.101 -t 104 # -c, --client <host> run in client mode, connecting to <host> # -t, --time time in seconds to transmit for (default 10 secs) Iperf3 是一个

java coroutine

“java coroutine” Kotlin https://github.com/puniverse/quasar https://github.com/offbynull/coroutines https://github.com/kilim/kilim

java 替换 ascii 不可见字符, StringEscapeUtils.escapeJava

“java 替换ascii不可见字符, StringEscapeUtils.escapeJava” StringEscapeUtils.escapeJava 1 StringEscapeUtils.escapeJava String.replaceAll 替换成? 1 my_string.replaceAll("\\p{C}", "?"); https://stackoverflow.com/questions/6198986/how-can-i-replace-non-printable-unicode-characters-in-java StringEscapeUtils 在java.commons.lang3的包中有许多方便好用的工具类,类似于处理字符串

jdk14

jdk14 instanceof 模式匹配 JDK 14的新特性:instanceof模式匹配 JDK14在2020年的3月正式发布了。可惜的是正式特性只包含了最新的Switch表

jdk16

jdk16 新语言特性 JEP 394,适用于 instanceof 的模式匹配 模式匹配 (Pattern Matching) 最早在 Java 14 中作为预览特性引入,在 Java 15 中还是预览特性。模式匹配通过对 instacneof 运算符进行模式匹配来

JTAG

“JTAG” JTAG JTAG (Joint Test Action Group,联合测试行动小组) 是一种国际标准测试协议,主要用于芯片内部测试。现在多数的高级器件都支持JTAG协议,如ARM、DS

jvm

jvm JVM是Java Virtual Machine (Java虚拟机)的缩写 常用jvm 目前市面上普遍使用的JVM大致有三种 Sun公司的HotSpot——绝大多数java开

jwt spring security

“jwt spring security” POST http://localhost:9333/api/users/sign-up content-type: application/json {“userName”:“123456”,“fullName”:“shuangkou”,“password”:“123456”} https://example.com/comments/1 POST https://example.com/comments HTTP/1.1 content-type: application/json { “name”: “sample”, “time”: “Wed, 21 Oct 2015 18:27:50 GMT” } https://www.jianshu.com/p/0c54788c94f3 https://github.com/Snailclimb/spring-security-jwt-guide

k8s

k8s pod Pod 是 Kubernetes 中可部署的最小、最基本对象。一个 Pod 代表集群中正在运行的单个进程实例。 Pod 包含一个或多个容器, 当 Pod 运行多个容器时,这些容器将作为一个实

Legendary

“Legendary” https://github.com/derrod/legendary https://github.com/doitsujin/dxvk/wiki/Common-issues legendary auth legendary list-games legendary launch Kinglet legendary list-installed –check-updates legendary launch Kinglet

lombok

“lombok” lombok注解介绍 lombok注解文档 lombok官网下载 lombok是一个可以帮助我们简化java代码编写的工具类,尤其是简化java

Mustache语法

“Mustache语法” Mustache是一个logic-less (轻逻辑) 模板解析引擎, 它是为了使用户界面与业务数

MySQL 显示行号,以及分组排序

“MySQL 显示行号,以及分组排序” CREATE TABLE my_tb ( id int(11) NOT NULL AUTO_INCREMENT, parent_code varchar(255) DEFAULT NULL, code varchar(255) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; INSERT INTO `my_tb` ( `parent_code`, `code`) VALUES ('01', '001'); INSERT INTO `my_tb` ( `parent_code`, `code`) VALUES ('01', '002'); INSERT INTO `my_tb` ( `parent_code`, `code`) VALUES ('02',