- 博客(23)
- 资源 (10)
- 收藏
- 关注
原创 notepad++正则表达式替换
temp=d+(a&b|~a&c)+buffer[9]+0x8b44f7af; d=a+(temp<<12|temp>>20); temp=c+(d&a|~d&b)+buffer[10]+0xffff5bb1; c=d+(temp<<17|temp>>15); temp=b+(c&d|~c&a)+buffer[11]+0x895cd7be; ...
2022-01-13 10:57:05 747
原创 cmake导入静态库,动态库,header only库
cmake_minimum_required(VERSION 3.5)project (testmath)#静态库add_library(libmyadd STATIC IMPORTED)set_target_properties(libmyadd PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/opt/work/myadd" IMPORTED_LOCATION "/opt/work/myadd/libmyadd.a")#动态库add_lib..
2021-10-10 11:23:48 920
转载 Are there any issues with allocating memory within constructor initialization lists?
https://stackoverflow.com/questions/9064298/are-there-any-issues-with-allocating-memory-within-constructor-initialization-li
2020-06-10 16:24:11 146
翻译 使用std::pair作为std::set的key
在这篇文章,我们看看如何在C++中使用std::pair作为std::set的key, 使用或者不使用比较对象。1. 使用默认排序我们可以使用std::pair作为std::set的key, std::pair定义在<utility>头文件。我们知道C++的pair类将一对相同或不同类型的值组合在一起,单个值可以通过公有成员first和second访问。我们可以使用C++...
2020-03-26 09:33:24 1675
转载 HTTP/REST API File Uploads
File uploads are one thing that always feel rather complicated, and working out how to handle this in an API doesn't make life easier. For many programmers, this has been abstracted away behind the HT...
2020-03-22 22:58:07 916
原创 再一次被vector动态扩容给坑了
#include <iostream>#include <thread>#include <vector>#include <mutex>class ThreadInfo;std::vector<ThreadInfo> g_thread_info;std::mutex print_m;class ThreadInfo{p...
2020-03-20 20:48:26 573
原创 How Endianness Effects Bitfield Packing
Hints for porting drivers.Big endian machines pack bitfields from most significant byte to least.Little endian machines pack bitfields from least significant byte to most.When we read hexidecimal...
2020-03-07 13:56:07 115
转载 正则表达式 Greedy Matching And Non-Greedy Matching
The usual rule for matching in REs is sometimes called “left-most longest“: when a pattern can be matched at more than one place within a string, the chosen match will be the one that starts at the ea...
2020-03-02 15:13:30 560
翻译 计时器使用steady_clock还是high_resolution_clock
在C++11之前,没有标准的方法精确测量一段代码的执行时间。程序员被迫使用外部库如boost,或者使用操作系统提供的函数。 C++11 chrono头文件提供了3个标准时钟可以用来计时: system_clock - 系统提供的实时时钟 high_resolution_clock - 当前系统时钟周期最短的时钟...
2019-09-08 17:29:51 5603
转载 pjsua 使能视频
为了在通话中使用视频,需要在pjsua的命令行中做以下设置vid enable ; 打开视频vid acc autotx on ; 即使打开了视频,默认视频也不会自动开始传输。要修改该设置vid acc autorx on ; 即使接收到了视频,默认也不会播放,要修改该设置vid call tx off 1 ...
2019-05-28 17:50:49 703
转载 What is the difference between Progressive Download, RTMP Streaming and Adaptive Streaming
http://www.mediaentertainmentinfo.com/2015/04/6-concept-series-what-is-the-difference-between-progressive-download-rtmp-streaming-and-adaptive-streaming.html/Online Video Delivery BackgroundRewind few...
2018-05-31 16:26:34 323
转载 Design Issues When Using IOCP in a Winsock Server
This article assumes you already understand the I/O model of the Windows NT I/O Completion Port (IOCP) and are familiar with the related APIs. If you want to learn IOCP, please see Advanced Windows (3
2017-06-22 17:19:28 309
转载 mp4 stsd/mp4a/esds 和 mp4 stsd/avc1/avcc
原文:http://doublescn.appspot.com/?p=113400200 00 00 27 65 73 64 73 00 00 00 00 03 19 00 02 ; ...'esds........00 04 11 40 15 00 06 00 00 01 F4 00 00 01 F4 00 ; ...@............05 02
2017-04-07 14:31:12 13068
转载 H.264 web video encoding tutorial with FFmpeg
H.264 web video encoding tutorial with FFmpeg06. January 2012 in Video encoding / FFmpegWeb is full of articles about encoding videos with FFmpeg, however most of them are obsolete and use o
2016-12-09 12:36:03 721
转载 explaination
装饰模式 in practice :http://programmers.stackexchange.com/questions/240281/how-is-the-decorator-pattern-actually-used-in-practice
2015-10-13 11:10:57 481
转载 Mixing two digital audio streams with on the fly Loudness Normalization by Logarithmic Dynamic Range
Paul Vögler, 2012-04-20Mixing two digital audio streams with on the fly Loudness Normalization by Logarithmic Dynamic Range Compression1 Index1 Index2 Preface3 Basics3.1 Sound Waves3
2015-03-10 20:17:40 1068
转载 va_start和va_arg
翻阅资料,大概知道了va_list可以看作一种数据类型,后面跟一个类似于指针的东西,指向个数不定的参数列表,可以用在vsprintf里,但是我困惑的是其中的va_start和va_end在里面什么作用?我完全不明白,网上只有人说类似于malloc和free的配对作用.望大侠指教有个源程序,里面就有va_start和va_end #include #include
2014-07-02 17:01:44 460
原创 FFT水面加入Choppy Waves
以前的水面都比较圆润,今天尝试加入了浪尖。仍然用OpenGL和Cg,通过片元着色器计算FFT。choppy waves的生成其实和高度图的生成很相似,以前无浪尖,只生成高度,相当于只偏移了网格点Y坐标,而加入浪尖相当于X和Z坐标也要偏移一下。这样displacementMap可以设计成:R通道存X坐标偏移值DX,G通道存Y坐标偏移值DY,B通道存Z坐标偏移值DZ。法线的生成用有限差分就足够了。
2012-12-20 20:25:15 1089 3
原创 大学期间部分OpenGL或Direct3D程序截图
程序名称:太湖水场景的模拟研究 程序描述:基于Tessendorf的FFT水面模型来模拟水动画,参考Thilaka的算法自行设计了在GPU上实现FFT的算法,设计了GPU上实现四叉树LOD算法对水面网格进行优化,结合菲涅尔系数以及PreethamSkylight天空模型、反射与折射效果渲染技术给水着色,结合Ernest和Wyman的论文实现了水下刻蚀的渲染,参考Lanza的
2012-10-09 09:18:50 2413 2
Expert C++: Become a proficient programmer by learning coding best practices
2020-08-02
C++17 The Complete Guide.pdf
2020-07-27
简单的C++线程池
2014-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人