9 caohongfei881

尚未进行身份认证

暂无相关简介

等级
TA的排名 30w+

使用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

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

再一次被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

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

正则表达式 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

计时器使用steady_clock还是high_resolution_clock

在C++11之前,没有标准的方法精确测量一段代码的执行时间。程序员被迫使用外部库如boost,或者使用操作系统提供的函数。 C++11 chrono头文件提供了3个标准时钟可以用来计时: system_clock - 系统提供的实时时钟 high_resolution_clock - 当前系统时钟周期最短的时钟...

2019-09-08 16:56:19

pjsua 使能视频

为了在通话中使用视频,需要在pjsua的命令行中做以下设置vid enable ; 打开视频vid acc autotx on ; 即使打开了视频,默认视频也不会自动开始传输。要修改该设置vid acc autorx on ; 即使接收到了视频,默认也不会播放,要修改该设置vid call tx off 1 ...

2019-05-28 17:50:49

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

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

技术待研

redis, kcp协议操作系统:http://pages.cs.wisc.edu/~remzi/OSTEP/

2017-05-25 15:02:28

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

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

未解之谜

renderer库,如果迟迟不向其送解码后的yuv数据,debug版本CPU低, release版本CPU飙到40%

2016-05-26 15:51:44

read h323plus

h232ep.cxx   525行

2016-03-14 16:21:35

explaination

装饰模式 in practice   :http://programmers.stackexchange.com/questions/240281/how-is-the-decorator-pattern-actually-used-in-practice

2015-10-13 11:10:57

windows编程 如何等待超过64个线程

2015-07-30 09:26:14

useful websites

http://www.geeksforgeeks.org/longest-monotonically-increasing-subsequence-size-n-log-n/

2015-07-13 09:37:38

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

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

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

查看更多

勋章 我的勋章
  • 勤写标兵Lv1
    勤写标兵Lv1
    授予每个自然周发布1篇到3篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。