学习C++的shared_ptr智能指针你可能会碰到一个问题,循环引用为什么会出现问题?为什么不能释放?C++不是保证了对象构造成功退出作用域时就绝对会调用析构函数吗,调用析构函数不也会调用成员变量和父类的析构函数吗,为什么还不能释放呢?难道是编译器有bug? 非也,原因是一句绕口令式的答案:你以为 ...
分类:
其他好文 时间:
2020-07-19 23:46:32
阅读次数:
114
Programmatically Selecting Objects import bpy def mySelector(objName, additive=False): # By default, clear other selections if not additive: bpy.ops.o ...
分类:
其他好文 时间:
2020-07-19 15:54:00
阅读次数:
61
动动手 0. 先练练手,把我们的刚开始的那个猜数字小游戏加上界面吧? 1 import random 2 import easygui as g 3 4 g.msgbox("嗨,欢迎进入第一个界面小游戏^_^") 5 secret = random.randint(1,10) 6 7 msg = " ...
分类:
其他好文 时间:
2020-07-18 13:38:23
阅读次数:
157
Go versus C++ g++ fastest programs vs C# .NET Core vs C++ vs Java vs Python vs Rust Always look at the source code. These are only the fastest program ...
分类:
其他好文 时间:
2020-07-17 16:05:11
阅读次数:
141
package _interview_question /** * Check if a given array contains duplicate elements within k distance from each other. * Given an unsorted array that ...
分类:
其他好文 时间:
2020-07-17 01:23:35
阅读次数:
107
1.在线颜色 https://sunpma.com/other/rgb/ 2.阿里巴巴图库 https://www.iconfont.cn/search/index?spm=a313x.7781069.1998910419.dac382181&searchType=icon&q=%E7%99%BB% ...
分类:
Web程序 时间:
2020-07-15 16:01:30
阅读次数:
93
260 Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. ...
分类:
其他好文 时间:
2020-07-14 21:54:31
阅读次数:
104
Note GET, primarily used to select resources. Other options for an API method include: POST, primarily used to create child resources. PUT, primarily ...
摘要: 本文介绍了分布式框架的简单实现,说明了自己的设计思路,以及RPC的一些具体细节。在文末,贴出一些关于rpc的资料。 0x00:什么是RPC wiki给出的定义如下:In distributed computing, a remote procedure call (RPC) is when ...
分类:
其他好文 时间:
2020-07-13 13:47:27
阅读次数:
71
1、有助于 提高锁性能 的几点建议: 1.1、减少锁持有时间 只有在必要时进行同步,这样明显 减少锁持有时间、提升系统的吞吐量; public synchronized void say(){ //do one //并发逻辑 //do other } /** * 优化后 */ public void ...
分类:
编程语言 时间:
2020-07-12 17:15:16
阅读次数:
67