Title
摘要: 随笔 - 0 文章 - 0 评论 - 0 随笔 - 0 文章 - 0 评论 - 0 C++初学之LeetCode刷题基础 2019/5/13 个人说明:这是我第一次写博客文章,主要是试写,写的不好请谅解。 初学C++ 下面是关于函数部分的学习 内联函数 默认参数列表 缺省参数列表 哑元函数 内联函数 阅读全文
posted @ 2019-05-13 22:44 .geek 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: ts基础类型 let s = 'st'; console.log(s); let arr: Array<number | string> = [1, 2, 3, '4']; let tupe: [number, string] = [0, '1']; // // 函数类型 // 对象 let obj 阅读全文
posted @ 2023-02-09 12:00 .geek 阅读(18) 评论(0) 推荐(0) 编辑
摘要: golang etcd 操作 go get -u -x google.golang.org/grpc@v1.26.0 package main import ( "context" "fmt" "time" "github.com/coreos/etcd/clientv3" ) func main( 阅读全文
posted @ 2022-11-16 11:12 .geek 阅读(181) 评论(0) 推荐(0) 编辑
摘要: vscode 配置运行redis 参考视频教程 https://github.com/wenfh2020/youtobe/blob/master/redis-debug.md https://wenfh2020.com/2020/01/05/redis-gdb/ 我的配置 { // See http 阅读全文
posted @ 2022-06-21 14:59 .geek 阅读(480) 评论(0) 推荐(0) 编辑
摘要: vscode 配置 c,c++ debug 运行环境 这里我们要配置 tasks.json ,最好搞一个模板 ctrl shift + p, 打开 open user tasks { // See https://go.microsoft.com/fwlink/?LinkId=733558 // f 阅读全文
posted @ 2022-06-21 14:25 .geek 阅读(303) 评论(0) 推荐(0) 编辑
摘要: vscode 调试golang配置 { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "co 阅读全文
posted @ 2022-06-21 13:37 .geek 阅读(321) 评论(0) 推荐(1) 编辑
摘要: docker 分段构建 参考教程 # Go语言环境基础镜像 FROM golang:latest # 将源码拷贝到镜像中 COPY server.go /go/release/ # 指定工作目录 WORKDIR /go/release # 编译镜像时,运行 go build 编译生成 app 可执行 阅读全文
posted @ 2022-06-21 00:38 .geek 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 分布式锁的实现 package main //使用 GitHub开源的分布式锁库 import ( "context" "errors" "github.com/bsm/redislock" "github.com/go-redis/redis/v8" "log" "math/rand" "time 阅读全文
posted @ 2022-01-14 09:21 .geek 阅读(89) 评论(0) 推荐(0) 编辑
摘要: shiro springboot 整合跨域问题解决方法 package io.github.lyr2000.dissertation.config; import org.springframework.boot.web.servlet.FilterRegistrationBean; import 阅读全文
posted @ 2021-12-30 17:53 .geek 阅读(297) 评论(0) 推荐(0) 编辑
摘要: go语言基本数据类型介绍 bool string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr byte // uint8 的别名 rune // int32 的别名 // 表示一个 Unicode 码点 flo 阅读全文
posted @ 2021-11-29 17:31 .geek 阅读(21) 评论(0) 推荐(0) 编辑
摘要: golang 排序库使用的方法 package main import ( "fmt" "sort" ) func main() { var w = []float64{1, 2, 3} var w1 = []int{1, 2, 3} sort.Float64s(w) fmt.Println(w) 阅读全文
posted @ 2021-11-29 16:58 .geek 阅读(203) 评论(0) 推荐(0) 编辑