前言: 常见的关于HahsMap与ConcurrentHashMap的问题: 数据结构、线程安全、扩容、jdk1.7 HashMap死循环、jdk1.8 HashMap红黑树、容量必须是2的冥次 HashMap 数据结构:数组,单向链表 线程安全:不安全,HashTable线程安全,但是全用了 sy ...
分类:
其他好文 时间:
2020-02-20 22:21:51
阅读次数:
88
The Promise.any() method accepts an array (or any other iterable) of promises as a parameter. It returns a Promise object that is fulfilled with the v ...
分类:
编程语言 时间:
2020-02-20 20:09:40
阅读次数:
69
测试智能指针是否为 NULL 在Qt的项目中,osg里有智能指针 然后可能和C++标准库不同 ,在判断智能指针是否为空的时候 以下来自与《More Effective C++》 ,读了觉得很有收获 文尾有我看VS2019的MSVC2017中的头文件 和 osg的 但是有一件我们做不到的事情是“发现灵 ...
分类:
其他好文 时间:
2020-02-20 15:38:40
阅读次数:
914
强化耦合 1.将隐式的关系变成显式的关系 例如:在界面的不同位置要显示不同的图形,位置和图形是一对一的关系,于是代码如下: for(int i = 0;i<count ;i++){ Draw(Shape[i], position[i]); } 分析: 因为连个数组元素之间的对应关系,并没有得到正式承 ...
分类:
其他好文 时间:
2020-02-19 14:52:29
阅读次数:
91
is-url-external 1.0.3 ? Public ? Published 3 years ago Readme ExploreBETA 0Dependencies 8Dependents 4Versions Is URL External? A simple function that ...
分类:
其他好文 时间:
2020-02-18 18:24:30
阅读次数:
77
此题是刘汝佳老师书里的例题,P260 欧拉定理: 设平面图的顶点数为V,边数为E,面数为F,则 V + F - E = 2; 注意这里的面数包括了外面那个面。 例如 这个图的面数 为 2, 因为包括了封闭面外面那个面。 #include <bits/stdc++.h> #define LL long ...
分类:
其他好文 时间:
2020-02-17 16:02:59
阅读次数:
80
那些迷惘的,恐惧的,凌乱的日子中,不断飞舞的指尖,是我划破虚无的利剑。XZ哥哥是我的军旗。 1.画图 import numpy as np from matplotlib import pyplot as plt # flag xf=np.linspace(0,30,100) yf=xf # bad ...
分类:
其他好文 时间:
2020-02-16 22:19:20
阅读次数:
91
[root@bs-k8s-ceph ~]# ceph osd pool create harbor 128 Error ETIMEDOUT: crush test failed with -110: timed out during smoke test (5 seconds) //这个问题 我不知 ...
分类:
Web程序 时间:
2020-02-16 21:00:38
阅读次数:
117
package com.example.webview; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompat ...
分类:
移动开发 时间:
2020-02-16 20:48:19
阅读次数:
309
```//类的初始化 QRCodeDetector QRCode;//opencv4二维码 MonocularRanging mono("../QR_test/cameraParams.xml");//单目测距类 ChooseTarget Chooser(20, 10);//选择目标 ChooseT... ...
分类:
其他好文 时间:
2020-02-16 10:17:34
阅读次数:
81