摘要: ... 批量删除 db.Where("id>?", 0).Unscoped().Delete(&Hs{}) 获取透明输出 var m1 map[string]interface{} if errRaw := SqlDb.Raw("delete from xxx_items where created 阅读全文
posted @ 2023-12-08 16:58 voh99800 阅读(8) 评论(0) 推荐(0) 编辑
摘要: ... from https://www.cnblogs.com/756623607-zhang/p/17310373.html 1 git log -- <file-path> 2 git checkout <commit-hash> -- <file-path> 阅读全文
posted @ 2023-12-01 11:30 voh99800 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 细节细节 管理员身份打开cmd 执行ssh-keygen, 获取 秘钥对 公钥复制到linux机器, cat id_rsa.pub >> ~/.ssh/authorized_keys vscode ssh config file: Host 10.0.11.13 HostName 10.0.11.1 阅读全文
posted @ 2023-07-24 14:54 voh99800 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ... from https://blog.csdn.net/m0_37422289/article/details/103362740 append 的最快 package main import ( "bytes" "fmt" "strings" "time" ) type Enet_smp_d 阅读全文
posted @ 2023-05-25 13:34 voh99800 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ... 函数式选项模式的使用场景有哪些呢:我们一般用来配置一些基础的服务配置,比如MySQL,Redis,Kafka的配置,很多可选参数,可以方便动态灵活的配置想要配置的参数。 https://zhuanlan.zhihu.com/p/436468481 type Option func(*User 阅读全文
posted @ 2023-03-01 10:23 voh99800 阅读(45) 评论(0) 推荐(0) 编辑
摘要: ... 1, extract all matched word from a single string, wo kao #https://stackoverflow.com/questions/10507076/perl-pattern-matching-where-we-print-all-ma 阅读全文
posted @ 2023-02-13 13:47 voh99800 阅读(16) 评论(0) 推荐(0) 编辑
摘要: .. I use Emacs in console. The linum-mode displays the line numbers just well. However, in the console, there is no space between the line numbers and 阅读全文
posted @ 2022-12-21 16:08 voh99800 阅读(16) 评论(0) 推荐(0) 编辑
摘要: ... 可以参考的博客, 百度 "cgo 入门,剖析与实践" 不使用库 结合.a 使用 m.go package main // #cgo CFLAGS: -I../include/ // #cgo LDFLAGS: -L./zhm -lzhm // #include <stdlib.h> // # 阅读全文
posted @ 2022-11-01 17:34 voh99800 阅读(19) 评论(0) 推荐(0) 编辑
摘要: .. 从这里抄的 https://blog.csdn.net/hxlawf/article/details/94623786, 做做记录 GCC编译选项CFLAGS参数 选项 说明-c 用于把源码文件编译成 .o 对象文件,不进行链接过程-o 用于连接生成可执行文件,在其后可以指定输出文件的名称-g 阅读全文
posted @ 2022-11-01 14:21 voh99800 阅读(48) 评论(0) 推荐(0) 编辑
摘要: .... 看到一段不懂的代码 local -a array ; array=( /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; echo -n ${array[@]##*/} 查了查 Linux Shell 内建命令 decl 阅读全文
posted @ 2022-10-28 16:04 voh99800 阅读(11) 评论(0) 推荐(0) 编辑
摘要: ... go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct 阅读全文
posted @ 2022-09-09 09:15 voh99800 阅读(9) 评论(0) 推荐(0) 编辑
摘要: go 程序员写c的痛苦... 1, char *argv[] char *argv 代表argv是一个字符串 而 char *argv[]则代表argv是一个字符串数组 2, 字符串数组 argv : 字符和字符串的区别. 赋值字符 argv[i][j] , 赋值字符串 : argv[i] . 这是 阅读全文
posted @ 2022-07-12 18:03 voh99800 阅读(78) 评论(0) 推荐(0) 编辑
摘要: ... <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://cdn.staticfile.org/angular.js/1.4.6/angular.min.js"></script> <style> #h 阅读全文
posted @ 2022-01-21 15:14 voh99800 阅读(14) 评论(0) 推荐(0) 编辑
摘要: ... package main import ( "fmt" "log" "time" "github.com/go-rod/rod" "github.com/go-rod/rod/lib/launcher" ) type TbPars struct { NavUrl string // firs 阅读全文
posted @ 2022-01-08 01:33 voh99800 阅读(476) 评论(0) 推荐(0) 编辑
摘要: ... 初始化匿名成员为接口的结构体,初始化参数需要是指针,ide帮忙解决了,结构体,可以直接调用初始化参数实现的方法,也就是接口内的方法 package main import "log" type Bird interface { Biss() } type Lan struct{} func 阅读全文
posted @ 2021-12-30 16:51 voh99800 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 1... 目的,一坨坨的函数选择执行... 2...code # file m.py from obj.tsk import Task from obj.acc import Acc map_name_cls = {"task": Task, "acc": Acc} fconf = [ {"task 阅读全文
posted @ 2021-12-15 11:34 voh99800 阅读(190) 评论(0) 推荐(0) 编辑
摘要: ... 使用mysql 客户端的正确姿势,解决一堆 3306 time_wait的问题 package dbs import ( "database/sql" "fmt" "log" "time" _ "github.com/go-sql-driver/mysql" ) var MysqlDb *s 阅读全文
posted @ 2021-10-14 14:48 voh99800 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 如果类不用于继承, python用类干嘛 如果不懂接口, 用golang 干嘛, 接口,并发都是相关的 阅读全文
posted @ 2021-09-13 14:32 voh99800 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Qtcreator 示例是空的 sudo apt-get install qtbase5-examples qtbase5-doc-html 阅读全文
posted @ 2021-08-25 17:05 voh99800 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 。。。 package main import ( "log" "net/http" "time" "github.com/gin-gonic/gin" ) func main() { // 1.创建路由 // 默认使用了2个中间件Logger(), Recovery() r := gin.Defa 阅读全文
posted @ 2021-08-25 10:30 voh99800 阅读(657) 评论(0) 推荐(0) 编辑
摘要: package cmd import ( "log" "github.com/spf13/cobra" flag "github.com/spf13/pflag" ) var Source string // 这里初始化了flag 环境 var cliName = flag.StringP("nam 阅读全文
posted @ 2021-08-19 18:04 voh99800 阅读(27) 评论(0) 推荐(0) 编辑
摘要: ... conf 文件 # Request definition [request_definition] r = sub, obj, act # Policy definition [policy_definition] p = sub, obj, act # Policy effect [pol 阅读全文
posted @ 2021-08-18 17:16 voh99800 阅读(32) 评论(0) 推荐(0) 编辑
摘要: from https://www.cnblogs.com/janbar/archive/2021/04/01/14607659.html 文章非常棒,无废话干货 package main import ( "flag" "fmt" "net/http" "golang.org/x/crypto/bc 阅读全文
posted @ 2021-08-17 11:31 voh99800 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ... git push origin :<branchname> 删除了远程分支 git remote prune origin 删除远程上不存在的分支的引用 git fetch <remote> --prune 这将删除所有过时的远程跟踪分支。该命令的缩写是: git fetch <remote 阅读全文
posted @ 2021-07-09 15:01 voh99800 阅读(52) 评论(0) 推荐(0) 编辑
摘要: F12 Ctrl+Shift+P input screenshot enter 阅读全文
posted @ 2021-07-09 10:45 voh99800 阅读(38) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/sueble/p/6901814.html 阅读全文
posted @ 2021-07-09 09:41 voh99800 阅读(22) 评论(0) 推荐(0) 编辑
摘要: ... sync lock package main import ( "fmt" "sync" ) type Item interface { } type ItemStack struct { items []Item lock sync.RWMutex } func NewStack() *I 阅读全文
posted @ 2021-07-01 16:49 voh99800 阅读(28) 评论(0) 推荐(0) 编辑
摘要: ... 一点例子 要不是考试要考,懒得看这俩货, 非高大上的项目估计用不到,提前处理下,不比用这个香 error 就是一个接口, 一个生成错误字符串的方法,总之就是和字符串有关系 type error interface { Error() string } package main import 阅读全文
posted @ 2021-07-01 16:29 voh99800 阅读(33) 评论(0) 推荐(0) 编辑
摘要: ... 这版正常点 package main import ( "bytes" "fmt" "golang.org/x/crypto/ssh" "io" "log" "net" "time" ) type Connection struct { *ssh.Client password string 阅读全文
posted @ 2021-06-10 00:38 voh99800 阅读(138) 评论(0) 推荐(0) 编辑
摘要: package main import ( "log" "testing" "github.com/ghodss/yaml" ) func TestApp(t *testing.T) { by := []byte(`settings: application: # dev开发环境 test测试环境 阅读全文
posted @ 2021-06-08 21:38 voh99800 阅读(85) 评论(0) 推荐(0) 编辑
摘要: /// 1, 父组件 > 子组件 子组件 @input get {} set {} 的意义是希望子组件收到参数进行一些处理后,再展示; 2,子组件监听父组件值变化 // 子组件实现ngOnchanges实现监听父组件传值变化 @Input() major: number; @Input() mino 阅读全文
posted @ 2021-05-28 22:26 voh99800 阅读(37) 评论(0) 推荐(0) 编辑
摘要: ... 参考 https://juejin.cn/post/6844904165181751304 https://www.jianshu.com/p/52500abbed5c?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes& 阅读全文
posted @ 2021-05-27 17:58 voh99800 阅读(84) 评论(0) 推荐(0) 编辑
摘要: ... html <d-button (btnClick)="HuGet()">huzh Get</d-button> <h5 class="text-muted">Standard: Single Select</h5> <div class="row"> <div class="col-md-5 阅读全文
posted @ 2021-05-25 23:46 voh99800 阅读(242) 评论(0) 推荐(0) 编辑
摘要: ... for 循环之前需要初始化被赋值的对象,否则每次被赋值的是同一个对象,而且是这个对象最后一次被赋值的情况 参考 https://blog.csdn.net/qq_38758765/article/details/115749097 HuDerr(): void{ this.data3.dat 阅读全文
posted @ 2021-05-21 23:54 voh99800 阅读(130) 评论(0) 推荐(0) 编辑
摘要: ... 占位 参考 https://zhiqianghe.blog.csdn.net/article/details/108440342 import paramiko, sys, time import multiprocessing as mp from multiprocessing impo 阅读全文
posted @ 2021-05-21 17:52 voh99800 阅读(53) 评论(0) 推荐(0) 编辑
摘要: ...占位 没有start 方法,create 方法来实现开机 conn = libvirt.open("qemu:///system") domain=conn.lookupByName("generic") domain.create() time.sleep(180) ____________ 阅读全文
posted @ 2021-05-19 14:05 voh99800 阅读(97) 评论(0) 推荐(0) 编辑
摘要: ...占位 1, 例子理解 // from https://blog.csdn.net/u011957758/article/details/82948750 package main import ( "context" "fmt" "math/rand" "time" ) /* 1, main 阅读全文
posted @ 2021-05-18 15:15 voh99800 阅读(59) 评论(0) 推荐(0) 编辑
摘要: ... 1, //wrong,别忘了 开头的 {"xxx": 和结尾的 }ss=[]byte(`[{"a":"a","b":"b"},{"a":"aa","b":"bb"}]`)//rightjs1 := []byte(`{"huzh":[{"a":"a","b":"b"},{"a":"a 阅读全文
posted @ 2021-05-11 15:44 voh99800 阅读(57) 评论(0) 推荐(0) 编辑
摘要: from https://www.cnblogs.com/ibgo/p/3900257.html 最后可能需要手动执行, package-list 界面会安装jedi会卡住,手动执行 pip3 install --upgrade /home/uos/.emacs.d/elpa/jedi-core-2 阅读全文
posted @ 2021-04-13 15:20 voh99800 阅读(50) 评论(0) 推荐(0) 编辑
摘要: .. 绘制并保存 阅读全文
posted @ 2021-04-01 15:25 voh99800 阅读(47) 评论(0) 推荐(0) 编辑