03 2023 档案
摘要:https://zhuanlan.zhihu.com/p/103661924
阅读全文
摘要:shangguigu_go account chapter10 chapter14 chapter15 chapter20 chapter10 chatroom chatsys customerManage familyaccount homework homework13day oa tcpdem
阅读全文
摘要:package main import ( "errors" "fmt" "os" ) // 使用一个结构体管理环形队列 type CircleQueue struct { maxSize int // 4 array [5]int // 数组 head int //指向队列队首 0 tail in
阅读全文
摘要:https://blog.csdn.net/qq_42055933/article/details/128935615?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EA
阅读全文
摘要:https://www.shuzhiduo.com/A/A2dmRLknze/ https://www.cnblogs.com/yuanchenqi/articles/9036479.html
阅读全文
摘要:django-crontab python manage.py crontab add | show | run xxx
阅读全文
摘要:https://www.cnblogs.com/pyedu/p/12461819.html https://www.cnblogs.com/Cl0ud/p/15322476.html
阅读全文
摘要:celery文章https://www.cnblogs.com/pyedu/p/12461819.html https://www.cnblogs.com/Cl0ud/p/15322476.html
阅读全文
摘要:##1 goland windows 点击Alt+Shift+Enter var _ someInterface =(*someStruct)(nil) package main type someInterface interface { DoSomething() DoAnotherThing(
阅读全文
摘要:任意一个对2的n次方的数求余,可以优化为 任意数 & (2^n-1),从累除法优化为位运算
阅读全文
摘要:import re a = 'sadf.4.555.asdf.123sadf.sadf' b = re.sub(r"\.([0-9a-zA-Z]+)\.[0-9a-zA-Z]+$", "-你好啊时间-\g<1>", a) ##2, 批量修改文件 #_*_ encoding: utf-8 _*_ @a
阅读全文
摘要:https://www.jianshu.com/p/31cdfd6f5a48 https://www.cnblogs.com/lojunren/p/3856290.html http://cenalulu.github.io/python/gil-in-python/ https://www.jia
阅读全文
摘要:package main import "fmt" func MapKeys[K comparable, V any](m map[K]V) []K { r := make([]K, 0, len(m)) fmt.Printf("001%v,%T\n", r, r) for k := range m
阅读全文
摘要:https://www.cnblogs.com/wql025/p/14439071.html
阅读全文
摘要:1, 间隔5的 package main import ( "fmt" "reflect" ) type Author struct { Name int `json:Name` Publications []string `json:Publication,omitempty` } func ma
阅读全文
摘要:package main import ( "fmt" ) //二分查找的函数 /* 二分查找的思路: 比如我们要查找的数是 findVal 1. arr是一个有序数组,并且是从小到大排序 2. 先找到 中间的下标 middle = (leftIndex + rightIndex) / 2, 然后让
阅读全文
摘要:package main import ( "fmt" "math/rand" "sort" ) // 1.声明Hero结构体 type Hero struct { Name string Age int } // 2.声明一个Hero结构体切片类型 type HeroSlice []Hero //
阅读全文
摘要:package main /* #cgo LDFLAGS: -lre2 -lcre2 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <cre2.h> */ import ( "C" "fmt" "unsafe"
阅读全文
摘要:package main import ( "fmt" ) type T struct { a int } func (t T) Get() int { return t.a } func (t *T) Set(i int) { t.a = i } //表达式`T.Get`和`(*T).Set`被称
阅读全文
摘要:package main import ( "fmt" "sync" "time" ) var producer = func(wg *sync.WaitGroup, l sync.Locker) { defer wg.Done() for i := 5; i > 0; i-- { l.Lock()
阅读全文
摘要:package main import ( "fmt" "time" ) //https://blog.csdn.net/qq_35655945/article/details/82706022 type Duration int64 const ( Nanosecond Duration = 1
阅读全文
摘要:package main import ( "fmt" "os" ) type point struct { x, y int } func main() { p := point{1, 2} fmt.Printf("001>>%v\n", p) // => {1 2} fmt.Printf("00
阅读全文
摘要:package main import ( "fmt" "strconv" ) func main() { //Go语言中不允许隐式转换,所有类型转换必须显式声明(强制转换),而且转换只能发生在两种相互兼容的类型之间。 i := 65 f := float64(i) u := uint(i) s :
阅读全文
摘要:package main import "fmt" func main() { //申明指针的时候,如果没有指向某个变量,默认值为nil //不能直接进行操作,包括读写 //而用new返回的是有默认值的指针, 为数据类型的默认值 var p1 = new(int) *p1 = 123 // pani
阅读全文
摘要:goland设置:https://blog.csdn.net/fly910905/article/details/127146795
阅读全文
摘要:参考自:https://blog.csdn.net/qq_40607566/article/details/123178731 1.在GoLand上方菜单栏点击Help->Find Action 或者 ctrl+shift+a 2.单击Find Action,输入Registry 3.单击Regis
阅读全文
摘要:package main import "fmt" func main() { /* panic:词义"恐慌", recover:"恢复" go语言利用panic(),recover(),实现程序中的极特殊的异常的处理 panic(),让当前的程序进入恐慌,中断程序的执行 recover(),让程序
阅读全文
摘要:package main import ( "fmt" ) func A() int { var i int defer func() { i++ fmt.Println("defer func A",i) }() fmt.Println("func A",i) return i } func B(
阅读全文
摘要:from threading import Timer Timer(time_difference, func, tuple(args)) timer.start() timer.cancel()
阅读全文