05 2022 档案
摘要:spring: mvc: view: prefix: / # 以webapp作为起点 suffix: .jsp
阅读全文
摘要:let arr = Array.from('vaunt') console.log(arr.slice(1, 3)) let slice = Array.prototype.slice console.log(slice) // [Function: slice] let bounded = sli
阅读全文
摘要:运算符重载: __add: tbl = setmetatable({ 1, 2, 33 }, { __add = function(tbl, v) -- tbl 的长度不断变化, table.insert的pos参数不能使用#tbl+1, 越界会产生 position out of bounds i
阅读全文
摘要:function producer() local i = 0 print(coroutine.running()) while true do i = i + 1 if i > 5 then error('out of number') end print('In Producer>> corou
阅读全文
摘要:repeat unitl 先执行循环体, 满足until条件时退出 for
阅读全文
摘要:一维数组 模拟 二维数组 array = {} rows = 3 cols = 4 for row = 1, rows do for col = 1, cols do array[(row - 1) * cols + col] = row * col end end for row = 1, row
阅读全文
摘要:实现continue功能: 输出odd number: b = 0 while b < 10 do if b % 2 == 0 then goto continue end print(b) :: continue :: b = b + 1 end
阅读全文
摘要:Module ngx_http_gzip_module (nginx.org) # http block include /etc/nginx/conf.d/gzip.conf gzip on; gzip_comp_level 6; gzip_min_length 1024; gzip_http_v
阅读全文
摘要:
阅读全文
摘要:数据收集 import java.util.stream.Collectors; import java.util.stream.Stream; public class B{ public static void main(String[] args){ List<Integer> l1 = St
阅读全文
摘要:类名::引用实例方法Java 类名只能引用静态方法, 类名引用实例方法是 拿第一个参数作为方法的调用者 import java.util.function.BiFunction; import java.util.function.Function; public class addThen{ pu
阅读全文
摘要:java.util.function 定义了一些预定义FuncationInterface Supplier: import java.util.function.Supplier; public class addThen{ public static void main(String[] arg
阅读全文
摘要:VisualVM: Plugins Centers
阅读全文
摘要:package main import ( "fmt" ) type node struct { id int name string next *node // Node会造成循环引用 } type SingleLinkedList struct { head *node // head!=nil
阅读全文
摘要:package main import ( "fmt" ) type Node struct { row int col int val int } func main() { var vail [7][9]int vail[2][8] = 5 vail[5][3] = 6 for _, row :
阅读全文
摘要:package main import ( "errors" "fmt" "os" ) type Queue struct { size int array []int head int tail int } func (queue *Queue) Push(v int) error { if qu
阅读全文
摘要:https://codingbee.net/powershell/powershell-make-a-permanent-change-to-the-path-environment-variable New-Item -ItemType Directory -Path C:\Windows\Pat
阅读全文
摘要:GPG: GnuPG(GNU Privacy Guard), GnuPG is an Open Source alternative to the well-know Pretty Good Privacy(PGP). dirmngr: 管理 CRL & OCSP 配置文件 /root/.gnupg
阅读全文
摘要:Server: import socket sock = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM) sock.bind(('0.0.0.0', 2222)) while True: msg, addr = sock.re
阅读全文
摘要:Refresh <META HTTP-EQUIV="Refresh" CONTENT="5;URL=http://host/path"> nginx: add_header Refresh '5; URL=https://www.baidu.com';
阅读全文
摘要:No Callback: package io.veer; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerConfig; import
阅读全文
摘要:Module ngx_stream_core_module (nginx.org) load_module /usr/lib64/nginx/modules/ngx_stream_module.so; stream { error_log stream.log debug; server { lis
阅读全文
摘要:https://downloads.apache.org/directory/KEYS
阅读全文
摘要:Core functionality (nginx.org)
阅读全文
摘要:Quick start | Python | gRPC
阅读全文
摘要:Module ngx_http_v2_module (nginx.org)
阅读全文
摘要:Module ngx_http_core_module (nginx.org) open_file_cache max=10 inactive=60s; open_file_cache_min_uses 1; open_file_cache_valid 60s; open_file_cache_er
阅读全文
摘要:Module ngx_http_slice_module (nginx.org) proxy_cache introspect; slice 1m; # 每次向upstream请求1m proxy_cache_key $uri$is_args$args$slice_range; proxy_set_
阅读全文
摘要:# # proxy_cache # # proxy_cache_path 必须位于http块, levels 指定缓存空间三层目录, 200m指内存缓存空间, max_size硬盘缓存空间 proxy_cache_path /var/cache/nginx/proxy levels=2:2:2 ke
阅读全文
摘要:https://github.com/go-redis/redis package main import ( "context" "fmt" "time" "github.com/go-redis/redis/v8" ) var ( ctx context.Context rdb *redis.C
阅读全文
摘要:Server: package main import ( "fmt" "net" ) func main() { fmt.Println("net.Listen") listen, err := net.Listen("tcp", "0.0.0.0:5555") if err != nil { f
阅读全文
摘要:package main import ( "fmt" "reflect" ) type Vale struct { Name string `json:"name,omitempty"` Age int `json:"vale_age,omitempty"` Score float32 `json
阅读全文
摘要:https://stackoverflow.com/questions/31650192/whats-the-full-name-for-iota-in-golang 一个常量块中,一个常量没有赋值,取上个常量的值 iota从0开始,每行++ 不推荐使用iota
阅读全文
摘要:func TypeAssert(items ...interface{}) { for i, v := range items { switch v.(type) { case bool: fmt.Printf("index: %d, type: %T, value: %v\n", i, v, v)
阅读全文
摘要:channel不能使用for循环动态遍历 package main import ( "fmt" ) func main() { intChan := make(chan int, 10) for b := 0; b < cap(intChan); b++ { intChan <- b + 100
阅读全文
摘要:func GetGoroutineId() (n uint64) { vail := make([]byte, 1024) vail = vail[:runtime.Stack(vail, true)] fmt.Println(string(vail)) vail = bytes.TrimPrefi
阅读全文
摘要:Polymorphic Array: package main import ( "fmt" ) type USB interface { Start() Stop() } type Phone struct { Name string } func (p *Phone) Start() { fmt
阅读全文
摘要:package main import ( "fmt" "math/rand" "sort" "time" ) // Vale Vale结构体 type Vale struct { Name string Age int } func (vale Vale) String() string { re
阅读全文
摘要:结构体的接口实现方法参数为指针类型时,会报编译错误 package main type USB interface { method() } type Vale struct { } func (vale *Vale) method() { // 指针类型 println("vale method"
阅读全文
摘要:package main import ( "fmt" ) type Calculator struct { N1, N2 float64 } func (c *Calculator) Print(n int) { for b := 1; b <= n; b++ { for p := 1; p <=
阅读全文
摘要:# Commen Name 不能相同 openssl genrsa -out ca.key 2048 openssl req -new -x509 -days 365 -key ca.key -out ca.crt openssl req -new -newkey rsa:2048 -keyout
阅读全文
摘要:Module ngx_http_referer_module (nginx.org) Nginx中有一个指令 valid_referers. 该指令可以用来获取 Referer 头域中的值,并且根据该值的情况给 Nginx全局变量 invalidreferer赋值。如果Referer头域中没有符合v
阅读全文
摘要:+ 号可省略 date +'%F %T' --date='+8 seconds' # 8秒后 date +'%F %T' --date='-8 seconds' # 8秒前 date +'%F %T' --date='+5 minutes' # 5分后 date +'%F %T' --date='-
阅读全文
摘要:Alphabetical index of variables (nginx.org) ngx_http_core_module 模块变量 Module ngx_http_core_module (nginx.org) ngx_http_upstream_module 模块变量 Module ngx
阅读全文
摘要:nginx_http_sub_module Module ngx_http_sub_module (nginx.org) ngx_http_addition_module Module ngx_http_addition_module (nginx.org)
阅读全文
摘要:index module Module ngx_http_index_module (nginx.org) autoindex module Module ngx_http_autoindex_module (nginx.org)
阅读全文
摘要:$document_root & $realpath_root 是文件夹 $request_filename 是文件 disable_symlinks Module ngx_http_core_module (nginx.org)
阅读全文
摘要:GoAccess: GoAccess - 中文站 - 可视化 Web 日志分析工具 goaccess access.log -o ../html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%Y-%b-%d
阅读全文
摘要:location ~ /Vend1/$ { return 201 'First RegExp $uri'; } location ~* /Vend1/(.*)$ { return 202 'IgnoreCase RegExp $uri'; } location ^~ /Vend1/ { return
阅读全文
摘要:Module ngx_http_realip_module (nginx.org) 先验证X-Real-IP & X-Forwarded-For: 验证realip proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_add
阅读全文
摘要:Express application generator (expressjs.com) import express from 'express' import bodyParser from 'body-parser' const app = express() app.use(bodyPar
阅读全文
摘要:将query string编码后发送 curl 'ram.canto.com/rt/tt' --data-urlencode 'name=啊&age=55' --get --data-urlencode <data> HTTP POST data url encoded --get Put the
阅读全文
摘要:Module ngx_http_core_module (nginx.org)
阅读全文
摘要:Module ngx_http_rewrite_module (nginx.org) Module ngx_http_core_module (nginx.org) error_page return error_page:
阅读全文
摘要:Module ngx_http_core_module (nginx.org) limit_conn_zone $binary_remote_addr zone=addr:10m; server { listen 80; server_name *.intrinsic.io; error_log l
阅读全文
摘要:<dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>3.3.0</version> </dependency> Code Generation Library: package io.veer.r
阅读全文
摘要:Teacher: package io.vend.velocity.vend; public class Teacher implements Cloneable{ private String name; public Teacher(String name){ this.name = name;
阅读全文
摘要:Installing Node.js via package manager | Node.js (nodejs.org) GitHub - Schniz/fnm: 🚀 Fast and simple Node.js version manager, built in Rust New-Item
阅读全文
摘要:LocalMachine: C:\Program Files\PowerShell\7\powershell.config.json CurrentUser: C:\Users\pretentious\Documents\PowerShell\powershell.config.json 使用Set
阅读全文
摘要:pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc
阅读全文
摘要:Downloading and Installing RabbitMQ — RabbitMQ rabbitmq-server/rabbitmq.conf.example at master · rabbitmq/rabbitmq-server · GitHub rabbitmq-server/adv
阅读全文
摘要:删除Cluster所有key: #!/bin/bash host=192.168.8.105 port=6365 user=default password=default nodes=$(redis-cli -c -h $host -p $port --user $user --pass $pas
阅读全文
摘要:CREATE TABLE tr ( id INT, name VARCHAR(50), purchased DATE ) PARTITION BY RANGE( YEAR(purchased) ) ( PARTITION p0 VALUES LESS THAN (1990), PARTITION p
阅读全文
摘要:# # ACL Configuration # # redis.conf ~* key正则 &- pub/sub channel +@ 权限 # +<command> -<command> +@<category> -@<category> # +@all -@all user default on
阅读全文
摘要:java -jar --add-exports=java.base/sun.net.util=ALL-UNNAMED .\sentinel-dashboard-1.8.4.jar --server.port=9090 注解支持 · alibaba/Sentinel Wiki · GitHub int
阅读全文
摘要:Get-Content input.txt | python .\skript.py | tee output.txt
阅读全文
摘要:持久化到MySQL: spring.datasource.platform=mysql ### Count of DB: db.num=1 ### Connect URL of DB: db.url.0=jdbc:mysql://127.0.0.1:3306/ssm?characterEncodin
阅读全文
摘要:MySQL: jdbc: mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=fals
阅读全文
摘要:@Component(value = "customBeanName") public class CustomComponentBean implements BeanPostProcessor{ @Override public Object postProcessAfterInitializa
阅读全文
摘要:从Spring 应用上下文获取 Bean 的常用姿势 - SegmentFault 思否 package io.deem.waive.config; import org.springframework.beans.BeansException; import org.springframework
阅读全文
摘要:Java之Filter - Zh1z3ven - 博客园 (cnblogs.com) package io.veal.filter; import javax.servlet.*; import java.io.IOException; public class FilterA implements
阅读全文
摘要:测试JWT package com.example.jwt; import com.auth0.jwt.JWT; import com.auth0.jwt.JWTCreator; import com.auth0.jwt.JWTVerifier; import com.auth0.jwt.algor
阅读全文
摘要:import base64, json primeval: bytes = b'<>??><?<>[' outcome = base64.b64encode(primeval) print('outcome:', outcome) print('altchars(-_):', base64.b64e
阅读全文
摘要:一个参数时, 此参数必须是dict key: Unicode ordinals(code point) 或 characters, 字符会被转为Unicode ordinals, 即 key 最终都被转为code point value: Unicode ordinals, strings, Non
阅读全文