C++ 11提供的智能指针有:shared_ptr、unique_ptr、weak_ptr。在 头文件 memory 中。 一、new delete 直接管理内存 1、初始化 string * ps = new string // 初始换为一个空string int * pi = new int ; ...
分类:
编程语言 时间:
2020-01-28 10:49:44
阅读次数:
99
使用 java操作 redis需要导入jedis的jar包、 jesid连接池: jedisPool 1使用: 1创建jedisPool连接池对象 2调用方法: getResource() 方法获取 jedis链接对象 3//创建一个配置对象 jedispoolComfig config = new ...
分类:
编程语言 时间:
2020-01-27 19:24:19
阅读次数:
96
1. maven项目,加入这一个依赖包即可, <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version></dependency>使用2.9.0版本的原因是 ...
分类:
编程语言 时间:
2020-01-26 20:39:01
阅读次数:
716
测试资源准备: 1)测试目标网站是https://www.cnblogs.com/DeryKong/ 2)测试目的是该网站在负载达到20 QPS 时的响应时间。 QPS 解释 QPS : Query Per Second 每秒查询率。是一台查询服务器每秒能够处理的查询次数。在因特网上,作为域名系统服 ...
分类:
其他好文 时间:
2020-01-23 16:58:00
阅读次数:
87
简单介绍Redis中Scan命令及在java中的使用,可以用于实现key的查找,同时避免了keys * 导致的雪崩问题 ...
分类:
其他好文 时间:
2020-01-23 11:13:27
阅读次数:
705
Overview Sharing a single thread within the district: PC Register/JVM Stack/Native Method Stack.All thread shared area: Heap/Method Area/Runtime Const ...
分类:
其他好文 时间:
2020-01-22 21:32:39
阅读次数:
93
MySQL版本:5.6 注意点: 单纯的 SELECT 不会加锁,INSERT UPDATE DELETE 默认加 X 。 文中的读都不是单纯 SELECT ,单纯的 SELECT 任何时候都可以进行。 共享锁 shared(S) lock 定义:A shared (S) lock permits ...
分类:
数据库 时间:
2020-01-22 20:00:04
阅读次数:
105
org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisC ...
分类:
编程语言 时间:
2020-01-21 16:16:26
阅读次数:
75
常规操作 public class TestReidsCommon { ? public static void main(String[] args) { // 创建连接 Jedis jedis = new Jedis("192.168.120.129", 6379); // 设置密码 如果没有密 ...
分类:
编程语言 时间:
2020-01-21 10:43:39
阅读次数:
96
0. 1. std::shared_ptr is a smart pointer that retains shared ownership of an object through a pointer. Several shared_ptr objects may own the same obj ...
分类:
编程语言 时间:
2020-01-21 00:40:14
阅读次数:
103