• HOME
  • SEARCH
  • TOPICS
  • DATA

  • Go 何时使用 new 和 make

    make slice:切片 map:映射 chan:通道 new array:数组 struct:结构体 所有值类型:int、float等

    2020-10-29, Views: 2151 , Topics: Go

  • Go 占用虚拟内存过高

    问题 在Linux系统中使用top命令发现VIRT列占用了700M。 解答 Go内存分配器在虚拟内存中预留了一大块区域作为分配的地方。这块虚拟内存局部于具体的G

    2020-10-28, Views: 7239 , Topics: Go Linux

  • Go 中的指数符号 e

    十的连乘 1e3 = 1000 1e6 = 1000000 5.6e20 = 5.6 * 1e20

    2020-10-27, Views: 5201 , Topics: Go

  • Go 设置镜像

    查看镜像 go env GOPROXY 输出 https://proxy.golang.org,direct 更改镜像 GoProxy中国 go env -w

    2020-10-26, Views: 5899 , Topics: Go 镜像

  • Go 时间加减、计算方法耗、毫秒转 Time

    时间日期 Now():当前Time对象。 Date():当前年月日。年和日为int类型,月为Month类型。 YearDay():当天是一年中的第几天。 We

    2020-10-25, Views: 26877 , Topics: Go

  • GoLand defer 提示 Unhandled error 解决方法

    代码处理 defer func() { err := db.Close() if err != nil { fmt.Printl

    2020-10-24, Views: 10523 , Topics: Go GoLand

  • Go 中的 GOROOT 和 GOPATH

    GOROOT GOROOT为Go的根目录,包含了bin、pkg、src等目录。 注意:不是Go的bin目录。 GOPATH GOPATH为Go第三方依赖存储的路

    2020-10-23, Views: 5418 , Topics: Go

  • Redis删除数据后内存不释放解决方法

    查看内存占用 info memory 输出 127.0.0.1:6379> info memory # Memory used_memory:322089

    2020-10-22, Views: 5769 , Topics: Redis

  • Jedis OOM command not allowed when used memory > 'maxmemory'

    原因 Redis内存满了(配置的最大内存为3G) 127.0.0.1:6379> info memory # Memory used_memory:322

    2020-10-21, Views: 5237 , Topics: Redis Java

  • RabbitMQ 用户相关命令

    相关命令 列表所有用户 sudo rabbitmqctl list_users 新增用户(用户名、密码) sudo rabbitmqctl add_user t

    2020-10-20, Views: 2102 , Topics: RabbitMQ

  • RabbitMQ 更换日志和数据存储目录

    步骤 创建mnesia和log两个文件夹 mkdir /home/rabbitmq/{mnesia,log} 目录授权 chmod -R rabbitmq:ra

    2020-10-19, Views: 5181 , Topics: RabbitMQ

  • RabbitMQ 重启命令

    第一步 关闭应用程序和Erlang节点 sudo rabbitmqctl stop 第二步 启动RabbitMQ节点 sudo service rabbitm

    2020-10-16, Views: 12728 , Topics: RabbitMQ

  • 网页文字不能复制解决方法

    案例 如360doc图书馆文章详情页无法复制问题。 方法一 仅在Chrome中有效,Firefox / IE / Edge 无效。 网页加载完毕后,在地址栏输入

    2020-10-10, Views: 4740 , Topics: JavaScript Chrome

  • Spring Boot JdbcTemplate in 语句注意事项

    描述 在多条件查询情况下,拼接SQL语句时使用到了in关键词不管参数传入List集合还是Array数组,等到的结果集都是空。 // MySQL List&lt

    2020-10-09, Views: 5611 , Topics: Spring Boot JdbcTemplate Java

  • OpenResty 清除 Sever 头信息

    需求 HTTP返回的Header中不带Server字段。 方式 使用OpenResty自带并默认开启的headers-more-nginx-module模块清除

    2020-10-04, Views: 6130 , Topics: OpenResty HTTP

  • Windows 平台 lua-resty-upload 上传的文件无法打开

    现象 使用lua-resty-upload示例代码上传的图片,在Windows平台无法打开,提示似乎不支持此文件格式。 对比发现上传后的文件比原始文件大了几KB

    2020-10-03, Views: 3834 , Topics: OpenResty Lua

  • MongoDB 搭建分片集群

    下载社区版 查看系统版本,判断是32位还是64位 uname -a 查看RedHat版本 cat /etc/redhat-release 可在package选择

    2020-09-30, Views: 5190 , Topics: MongoDB

  • MongoDB 清理历史数据释放磁盘空间

    清理数据 MongoDB删除了无用数据后,并不会释放磁盘空间。需使用compact或repairDatabase命令。 repairDatabase 4.2版本

    2020-09-29, Views: 10880 , Topics: MongoDB

  • MongoDB 提示 None of the hosts for replica set could be contacted

    错误信息 发生错误是在MongoDB的3.2.8版本分片部署模式下。查询时得到错误码71,可能当时正在做大批量删除历史数据操作,出现了以下错误。(笔者的分片副本

    2020-09-28, Views: 4814 , Topics: MongoDB

  • Java7 文件变动监听

    使用场景 应用配置热更新。 代码 可用于监听单个文件变更。 public static void main(String[] args) { try {

    2020-09-27, Views: 2845 , Topics: Java

  • First Prev
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • Next Last

©2025 沪ICP备18012661号-1 阿里云

Messages Sitemap GitHub