腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
PHP修行之路
专栏作者
举报
117
文章
123398
阅读量
25
订阅数
订阅专栏
申请加入专栏
全部文章
php
编程算法
go
http
html
sql
数据库
云数据库 SQL Server
nginx
容器镜像服务
网络安全
github
linux
网站
git
容器
面向对象编程
https
swoole
json
云数据库 Redis
打包
开源
rpc
安全
int
io
c++
unix
腾讯云测试服务
游戏
缓存
爬虫
tcp/ip
socket编程
windows
数据结构
func
image
import
package
对象
服务
设计模式
其他
python
javascript
c#
bash
vue.js
node.js
jquery
typescript
composer
oracle
access
phpmyadmin
bash 指令
文件存储
日志服务
访问管理
日志数据
企业
存储
分布式
shell
ssh
dns
udp
lnmp
数据分析
验证码
腾讯云
adapter
ansi
app
channel
config
default
error
file
fopen
fwrite
location
mysql
null
openresty
reduce
return
rgb
select
target
truncate
变量
博客
磁盘
代理
单例模式
工具
工作
集合
接口
客户端
框架
内存
调试
同步
统计
系统
异步
中间件
搜索文章
搜索
搜索
关闭
io排查工具 iostat/iotop/vmstat
io
磁盘
工具
统计
系统
主要用于监控系统设备的IO负载情况,iostat首次运行时显示自系统启动开始的各项统计信息,之后运行iostat将显示自上次运行该命令以后的统计信息。
码缘
2023-05-01
549
0
Mysql全文索引实现模糊查询
数据库
云数据库 SQL Server
sql
MySQL 5.7.6开始,MySQL内置了ngram全文解析器,用来支持中、日、韩文的分词
码缘
2023-03-10
1.7K
0
golang 简单连接池
参考链接:https://blog.csdn.net/finghting321/article/details/106492915/
码缘
2023-01-07
243
0
Golang ast 的使用
变量
从文件中获取注释信息 package main import ( "go/ast" "go/parser" "go/token" "log" "path/filepath" ) type Visitor struct { fset *token.FileSet } func (v *Visitor) Visit(node ast.Node) ast.Visitor { switch node.(type) { //判断ast分类 case *ast.FuncDecl: de
码缘
2022-12-14
763
0
golang内存对齐的重要性
内存
结构体中字段类型的改变直接造成内存对齐结果的改变,是的占用内存空间也不一样 package main import ( "fmt" "unsafe" ) func main() { var xx struct { a bool b int32 c []int } var x struct { a int32 b []int c bool } fmt.Println("SIZE") fmt.Println(unsafe.Sizeof(x)) //32 fmt
码缘
2022-11-18
220
0
go安装服务
服务
golang 安装程序为服务 package main import ( "context" "fmt" "io" "log" "net/http" "os" "path/filepath" "github.com/gin-gonic/gin" "github.com/kardianos/service" ) type Services struct { Log service.Logger Srv *http.S
码缘
2022-10-05
336
0
AWK使用
编程算法
linux
unix
引子 zcat hnmuseum_21070701.gz|awk -F'[: ]' '{size[$3":"$4]+=$11} END{for(time in size){print time,size[time]*1.1/1024/1024}}'|sort 命令组成分三个部分:BEGIN、BODY、END BEGIN和END需要关键字进行声明,而且是命令中的可选部分,其在命令执行时之后执行一次 BODY部分不需要关键字声明,但是在命令执行时BODY部分会根据输入的行数而执行多次 awk 'BEGIN{p
码缘
2022-09-21
601
0
PHP8.1 Fiber
https://juejin.cn/post/6993613191955611684
码缘
2022-09-21
232
0
Redis 可视化工具
云数据库 Redis
网站
打包
go
vue.js
基于go+vue的web版redis管理工具【Web redis management tool based on golang and vue】
码缘
2022-09-16
2.2K
0
golang 文件Seek和Truncate的结合使用
truncate
在需要分步写入整条信息时做回滚操作时使用 /* * @Description: * @Author: gphper * @Date: 2021-11-06 20:11:56 */ package main import ( "fmt" "io" "log" "os" ) func main() { f, err := os.OpenFile(`file.txt`, os.O_RDWR, os.ModePerm) if err != nil { log.Fatal(err) }
码缘
2022-05-10
674
0
解决windows docker开发swoft启动慢的问题
容器镜像服务
bash
bash 指令
容器
原理: 1.docker加载windows系统共享目录里面的文件很慢 2.docker加载容器内部目录的文件很快 3.raync同步文件时只会同步有差异的文件,所以同进的时候挺快 步骤: 1.容器中安装 rsync apt-get install rsync 2.将以下两个文件添加到项目的根目录 exclude.log vendor .git .idea public/* resource/* runtime/* test/* key/* push.sh #!/bin/bash rsync -azv --e
码缘
2021-08-18
1.2K
0
对int类型进行i++自增操作时并不是原子操作,并发不安全
int
package main import ( "fmt" "runtime" "sync" ) func main() { runtime.GOMAXPROCS(5) var m int32 = 0 var group sync.WaitGroup for i := 0; i < 100000; i++ { group.Add(1) go func() { defer func() { group.Done() }() // atomic.AddInt32(&m, 1
码缘
2021-06-22
660
0
go-micro 本地搭建及使用consul
go
github
http
git
开源
安装(前提是本地已安装protobuf和protof的go扩展) go get github.com/micro/micro go get github.com/micro/go-micro go get github.com/micro/protoc-gen-micro go get github.com/micro/go-plugins/registry/consul 支持consul需要单独安装这个包 go get github.com/micro/go-plugins/registry
码缘
2021-05-07
1.3K
0
consul使用
go
http
下载地址 https://releases.hashicorp.com/consul/,将下载的consul.exe 文件目录添加到系统环境中,然后执行 consul agent -dev 启动,默认监听8500端口,可以访问 http://127.0.0.1:8500/ 进行查看
码缘
2021-05-07
749
0
grpc调用protobuf生成的文件
rpc
go
记录下protoc生成go文件后,使用grpc调用的过程 grpc安装 go get -u -v google.golang.org/grpc server.go package main import ( "context" "fmt" "google.golang.org/grpc" "net" "rpc/student" "strconv" ) type Stu struct { } func (s Stu) GetInfo (ctx context.Context, req
码缘
2021-05-07
548
0
protobuf的使用
打包
go
rpc
先上官方使用文档 https://developers.google.cn/protocol-buffers/docs/proto3
码缘
2021-05-07
2K
0
protobuf windows环境安装
数据结构
github
git
开源
go
protocol buffers 是一种语言无关、平台无关、可扩展的序列化结构数据的方法,它可用于(数据)通信协议、数据存储等。总之微服务中需要使用的东西
码缘
2021-05-07
5.8K
0
使用net/rpc构建微服务
rpc
服务
客户端
异步
使用rpc启动一个订单中心服务 package main import ( "net" "net/http" "net/rpc" "time" ) type OrderCenter struct { } //暴露的方法必须符合 func (t *T) MethodName(argType T1, replyType *T2) error 形式 func (order *OrderCenter) GetInfo(res int, rep *map[string]interface
码缘
2021-05-07
242
0
golang——image库图片上写字
image
package main import ( "github.com/golang/freetype" "image" "image/color" "image/png" "io/ioutil" "log" "os" ) func main() { //图片的宽度 srcWidth := 200 //图片的高度 srcHeight := 200 imgfile, _ := os.Create("out.png") defer imgfile.Close() img := im
码缘
2021-04-28
2.1K
1
golang标准库——image
image
使用golang标准库中的 image 库合成图片 package main import ( "fmt" "image" "image/draw" _ "image/jpeg" "image/png" "os" ) func main() { file,err := os.Open("./public/1.jpg") if err != nil{ fmt.Println(err) } img,_,imgErr := image.Decode(file) if imgErr
码缘
2021-04-27
609
0
点击加载更多
社区活动
Python精品学习库
代码在线跑,知识轻松学
点击查看
【玩转EdgeOne】征文进行中
限时免费体验,发文即有奖~
立即参加
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·干货材料·成员作品·最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档