Let's create test tablemasterwith two columns,con_idwith unique constraint andind_idindexed by unique index. create table master ( con_id integer unique, ind_id integer ); create unique index master_unique_idx on master (ind_id); ...

Vicw.com用户头像 - XanderCheung XanderCheung 5511 0 0

Postgresql generate_series 生成数据方法 generate_series 介绍 generate_series ( start integer, stop integer [, step integer ] ) → setof integer generate_series ( start bigint, stop bigint [, step bigint ] ) → setof bigint gene...

Vicw.com用户头像 - XanderCheung XanderCheung 4717 0 0

程序猿 - Rabbitmq consumers disappear 消费者无故消失

背景: 线上使用 rabbitmq,consumers 经常无故消失 查找问题 1. 先是查看代码,发现 consumer 消费逻辑都没有报错,也没有发现 connection close 的情况,未发现问题所在 2. 查 rabbitmq log 进入 ...

Vicw.com用户头像 - XanderCheung XanderCheung 20724 0 0

使用scale视频过滤器将输入缩放(调整大小)为特定大小,然后使用overlay视频过滤器将视频放置在静态图像上。 ffmpeg -loop 1 -i background.png -i video1.mp4 -i video2.mp4 -filter_complex \\ "[1:v]scale=(iw/...

Vicw.com用户头像 - XanderCheung XanderCheung 9924 0 0

/** * @example * const mutex = syncLock() * await mutex.lock() * mutex.unlock() */ function syncLock() { let lk = false const mutex = {} mutex.lock = async function() { while (lk) { await sleep(100) if (!lk) { ...

Vicw.com用户头像 - XanderCheung XanderCheung 3034 0 0

const sleep = m => new Promise(r => setTimeout(r, m)); await sleep(3000);

Vicw.com用户头像 - XanderCheung XanderCheung 3367 0 0

在vue.config.js 中添加一行process.env.VUE_APP_VERSION = process.env.npm_package_version或者 process.env.VUE_APP_VERSION = require('./package.json').version,例: process.env.VUE_APP_VERSION = require('./package.json').version mo...

Vicw.com用户头像 - XanderCheung XanderCheung 7869 0 0

package main import ( "fmt" "sync" ) func printWord(word string, count int, currentChan, nextChan chan struct{}, wg *sync.WaitGroup) { var i = 0 for i < count { if _, ok := <-currentChan; ok { fmt.Print...

Vicw.com用户头像 - XanderCheung XanderCheung 8425 0 1

func main() { var a uint = 1 var b uint = 2 fmt.Println(a - b) } 最终结果不是 -1,如果系统是64位,结果是 2的64次方减1如果系统是32位,结果是 2的32次方减1

Vicw.com用户头像 - XanderCheung XanderCheung 4970 0 0