遇见YY

导航

 
上一页 1 2 3 4 5 6 ··· 13 下一页

2021年2月4日

摘要: 在HashMap中增加、删除、查找键值对时,定位key值在table中的索引位置都是一个关键的步䠫。 第一步计算key值的Hash值: static final int hash(Object key) { int h; return (key == null) ? 0 : (h = key.has 阅读全文
posted @ 2021-02-04 15:24 一骑红尘妃子笑! 阅读(555) 评论(0) 推荐(1) 编辑
 
摘要: 下面来自Java8 HashMap的部分源码: static final int MAXIMUM_CAPACITY = 1 << 30; static final int tableSizeFor(int cap) { int n = cap - 1; n |= n >>> 1; n |= n >> 阅读全文
posted @ 2021-02-04 10:44 一骑红尘妃子笑! 阅读(106) 评论(0) 推荐(0) 编辑
 

2021年1月15日

摘要: template class oprional;//since C++17 The class template std::optional manages an optional contained value, i.e. a value that may or may not be presen 阅读全文
posted @ 2021-01-15 15:08 一骑红尘妃子笑! 阅读(413) 评论(0) 推荐(0) 编辑
 
摘要: #include <iostream> class Example { public: Example() { std::cout << "Default Example!" << std::endl; } Example(int id) : ID(id) { std::cout << "Examp 阅读全文
posted @ 2021-01-15 10:42 一骑红尘妃子笑! 阅读(918) 评论(0) 推荐(0) 编辑
 

2021年1月14日

摘要: 头文件: #include<csignal> int raise(int sig) 作用: 对程序发送信号sig,同时信号处理程序被调用,信号处理程序使用stdsignal()函数指定。 如果没有使用stdsignal()设置用户自定义的信号处理程序,则信号sig将被忽略或者调用默认的信号处理程序. 阅读全文
posted @ 2021-01-14 20:59 一骑红尘妃子笑! 阅读(283) 评论(0) 推荐(0) 编辑
 
摘要: 头文件:#include<type_traits> 可能的实现: template<class T,T v> struct integral_constant{ static constexpr T value = v; using value_type = T; using type = inte 阅读全文
posted @ 2021-01-14 20:26 一骑红尘妃子笑! 阅读(273) 评论(0) 推荐(0) 编辑
 

2021年1月13日

摘要: range-v3是C++14/17/20的一个Range库。range-v3是C++标准库(std库)的基础,其目标也是为了添加到C++标准库之中。 range-v3通过技术规范的演变,最终形成了P0896R4 (https://wg21.link/p0896r4) 范围提案文档,并且在2018年1 阅读全文
posted @ 2021-01-13 13:26 一骑红尘妃子笑! 阅读(1371) 评论(0) 推荐(1) 编辑
 

2021年1月5日

摘要: 方法一: import os import cv2 as cv import numpy as np # 读取yuv420p的一帧文件,并转化为png图片 if __name__ == '__main__': filepath = 'one_frame_of_highway.yuv' binfile 阅读全文
posted @ 2021-01-05 22:05 一骑红尘妃子笑! 阅读(902) 评论(0) 推荐(0) 编辑
 

2021年1月4日

摘要: import os import cv2 import numpy as np import pygame from PIL import Image def compose_two_image_with_hstack(left, right): img1 = cv2.imread(left) im 阅读全文
posted @ 2021-01-04 21:45 一骑红尘妃子笑! 阅读(1609) 评论(0) 推荐(0) 编辑
 

2020年12月20日

摘要: 什么是benchmark与baseline? https://www.zhihu.com/question/22529709 folly/Benchmark.h提供了用于编写和执行基准测试的简单框架。当前,该框架仅针对单线程测试。 简单的使用方式: #include <folly/Benchmark 阅读全文
posted @ 2020-12-20 09:51 一骑红尘妃子笑! 阅读(431) 评论(0) 推荐(0) 编辑
 
上一页 1 2 3 4 5 6 ··· 13 下一页