The Atomic Reference Counter (Arc) type is a smart pointer that lets you share immutable data across threads in a thread-safe way. I couldn’t find any ...
分类:
其他好文 时间:
2021-01-01 12:32:52
阅读次数:
0
1.代码实现 package main import ( "fmt" "github.com/gomodule/redigo/redis" ) var pool *redis.Pool; func init(){ pool = &redis.Pool{ MaxIdle: 8, MaxActive:0 ...
分类:
其他好文 时间:
2021-01-01 12:17:32
阅读次数:
0
实现技巧 负下标 有的时候我们需要存一些负的东西,比如我就只要一个 \(-1\),或者说值域是 \([-10^6,10^6]\),而我懒得写平移 (写平移不仅麻烦,而且万一忘了就会RE,并且在本地不一定会被检测出来) 那咋整呢? 取下标:a[i],它的本质是 *(a+i) 开一个pool,然后开一个 ...
分类:
其他好文 时间:
2021-01-01 12:00:53
阅读次数:
0
1、安装ntpdate,执行以下命令 # 安装utpdate命令 yum install ntpdate -y 2、手工同步网络时间,执行以下命令,将从time.nist.gov同步时间 ntpdate 0.asia.pool.ntp.org 若上面的时间服务器不可用,也可以选择以下服务器同步时间 ...
分类:
系统相关 时间:
2020-12-31 12:13:31
阅读次数:
0
在阿里云服务器Centos7中安装mysql5.7,解压数据库初始化后,报错 ./mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or di ...
分类:
数据库 时间:
2020-12-31 11:58:26
阅读次数:
0
1. logrotate 介绍 logrotate 程序是一个日志文件管理工具。用来把旧的日志文件删除,并创建新的日志文件,称为日志 转储或滚动。可以根据日志文件的大小,也可以根据其天数来转储,这个过程一般通过 cron 程序来执 行 2. logrotate 配置 相关文件 计划任务:/etc/c ...
分类:
其他好文 时间:
2020-12-30 11:21:45
阅读次数:
0
1、Bean 的作用域介绍 我们可以通过XML<bean> 元素中的 scope 属性 或者 @Scope 注解 来设置,例如: XML 中设置作用域:<bean id="" class="" scope="prototype" />注解设置作用域: @Scope("prototype") 或者 @ ...
分类:
编程语言 时间:
2020-12-30 10:58:35
阅读次数:
0
体系结构概述: @Bean 之前时候,在xml配置文件使用: <bean id="person" class="com.atguigu.bean.Person" scope="prototype" > <property name="age" value="${}"></property> <pro ...
分类:
编程语言 时间:
2020-12-28 12:01:10
阅读次数:
0
CephPool资源池管理#查看ceph资源池cephosdlspools#创建资源池osdpoolcreate<poolname><int[0-]>{<int[0-]>}{replicated|erasure}{<erasure_code_profile>}{<rule>}{<int>}{<int>}{<i
分类:
其他好文 时间:
2020-12-28 11:56:49
阅读次数:
0
PlacementGroupPG_NUM创建新池时,cephosdpoolcreate{pool-name}pg_num必须选择的值,因为它不能(当前)自动计算。下面是一些常用的值:pg_num少于5个OSD设置为128pg_num5到10个OSD设置为512pg_num10到50个OSD设置为1024pg_num如果您有50多个OSD,您需要了解权衡以及如何自己计算值pg_num要自己计算值,请
分类:
其他好文 时间:
2020-12-28 11:56:36
阅读次数:
0