当进行拷贝或赋值操作时,每个shared_ptr都会纪录有多少个其他shared_ptr指向相同的对象: auto p = make_shared<int>(50);//p指向的对象只有p一个引用者 auto q = p; //p和q指向相同对象,此对象有两个引用者; 智能指针类能记录有多少个sha ...
分类:
编程语言 时间:
2020-07-28 22:13:59
阅读次数:
134
pip install python-docx 1.批量化往word文件中添加大批量重复的数据 from docx import Document from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.shared import Pt #磅数 ...
分类:
编程语言 时间:
2020-07-28 00:24:17
阅读次数:
113
首先咱们要明白一个道理就是,SharedPreferences其实就是一个存储工具,只需要知道怎么存,怎么获取就可以了。 如何存: 很明显需要我们声明一个SharedPreferences 比如SharedPreferences sp; 然后需要进行编辑,比如增删改查,就需要调用editor方法 S ...
分类:
其他好文 时间:
2020-07-26 19:47:50
阅读次数:
88
前提 并发编程大师Doug Lea在编写JUC(java.util.concurrent)包的时候引入了java.util.concurrent.locks.AbstractQueuedSynchronizer,其实是Abstract Queued Synchronizer,也就是"基于队列实现的抽 ...
分类:
其他好文 时间:
2020-07-24 09:21:44
阅读次数:
94
在Zabbix Server服务器上安装oracle-instantclient11.2后,结果使用sqlplus命令时遇到“sqlplus: error while loading shared libraries: libnsl.so.1: cannot open shared object f... ...
分类:
数据库 时间:
2020-07-23 23:19:25
阅读次数:
107
学习C++的shared_ptr智能指针你可能会碰到一个问题,循环引用为什么会出现问题?为什么不能释放?C++不是保证了对象构造成功退出作用域时就绝对会调用析构函数吗,调用析构函数不也会调用成员变量和父类的析构函数吗,为什么还不能释放呢?难道是编译器有bug? 非也,原因是一句绕口令式的答案:你以为 ...
分类:
其他好文 时间:
2020-07-19 23:46:32
阅读次数:
114
This section describes lock types used by InnoDB. 翻译:本节描述了InnoDB使用的锁类型。 Shared and Exclusive Locks(共享锁和排他锁) Intention Locks(意向锁) Record Locks(记录锁) Gap ...
分类:
数据库 时间:
2020-07-18 22:25:46
阅读次数:
107
部分内容参考:https://www.cnblogs.com/corgi/p/5405453.html 本文章地址:https://www.cnblogs.com/LynnVon/p/13334523.html 当我按照文章做完之后,editor模式下完全没问题,Standalone模式下也没问题, ...
分类:
其他好文 时间:
2020-07-18 11:35:04
阅读次数:
109
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory 在CentOS 7.6 操作系统的机器上安装 MySQL 过程中,执行安装命令报 ...
分类:
其他好文 时间:
2020-07-17 13:34:29
阅读次数:
60
from docx import Document from docx.shared import Cm 文件=Document(r'E:\word练习\页眉页脚.docx') 第一节=文件.sections[0] print(第一节.gutter.cm) 第一节.gutter=Cm(2) prin ...
分类:
其他好文 时间:
2020-07-12 12:21:17
阅读次数:
52