[source code reading] - Sylar server framework: timer module
Timer module overview
sylar implements the timer function based on epoll. Because the accuracy of epoll is milliseconds, the accuracy of its timer is also milliseconds. The timer has the design based on time wheel and time heap. In sylar, it adopts the design of minimum heap. For the specific explanation of timer, please refer ...
Posted by rrijnders on Mon, 06 Dec 2021 22:32:47 -0800
Audio and video interception based on FFMPEG (C++Qt version)
Audio and video interception based on FFMPEG (C++Qt version)
This blog is based on the previous blog:
https://blog.csdn.net/liyuanbhu/article/details/121744275
The last blog realized the file encapsulation conversion. We add a little more function on this basis. The implementation can arbitrarily intercept audio and video within a period of ...
Posted by Centrek on Mon, 06 Dec 2021 19:30:31 -0800
Configure c + + for vscode under linux to debug it like visual studio 2019
c + + compiling mode under linux
Under win, visual studio has carried out a large number of encapsulation for us, and designed a large number of easy-to-use configurations and interfaces, so that developers pay too much attention to the underlying compilation and linking process, and only need to pay attention to t ...
Posted by ultk on Mon, 06 Dec 2021 16:48:56 -0800
Detailed explanation of smart pointer
unique_ptr is one of the smart pointers provided by C++ 11 to prevent memory leakage. It is a smart pointer that exclusively enjoys the ownership of the managed object pointer. unique_ The PTR object wraps a raw pointer and is responsible for its life cycle. When the object is destroyed, the associated original pointer is deleted in its destruc ...
Posted by mkohan on Mon, 06 Dec 2021 15:41:32 -0800
[LeetCode] 2095. Delete the Middle Node of a Linked List as the intermediate node of the chain list
Author: Ming Xue Candleid: fuxuemingzhuPersonal blog: http://fuxuemingzhu.cn/Public number: snowy candlesKey words in this article: Leetcode, buckle, brush title, Python, C++, chain list, intermediate node, delete
Title Address: https://leetcode-cn.com/problems/delete-the-middle-node-of-a-linked-list/
Title Description
Give you the he ...
Posted by Shendemiar on Mon, 06 Dec 2021 09:36:46 -0800
C + + virtual functions and polymorphism
Virtual functions and virtual function tables
Virtual function: a member function decorated with virtualImpact of virtual function on class: add a pointer, 32-bit 4 bytes, 64 bit 8 bytesVirtual function table: a pointer that stores the first addresses of all virtual functions
Virtual functions and polymorphisms
Polymorphism: different results ...
Posted by solee on Sun, 05 Dec 2021 20:35:40 -0800
C++ Primer learning notes - object move
background
The new feature of C++ 11 is object movement. Objects can be moved instead of copied. In some cases, objects are destroyed immediately after being copied, such as value passing parameters, objects are returned by value passing, and temporary objects construct another object. In these cases, using moving objects instead of copying ob ...
Posted by jamessw on Sun, 05 Dec 2021 15:47:44 -0800
L2 - Fundamentals of data structures - Lesson 07 - Dynamic Arrays
L2 - Fundamentals of data structures - Lesson 07 - Dynamic Arrays
Original gourd teacher Yunfan youpei 2020-12-19 13:34 L2 - Fundamentals of data structures - Lesson 07 - Dynamic Arrays Variable length array
cin >> n;
int a[n];
Strictly speaking, the above code is not supported by c + + standard, although most compilers can compile it ...
Posted by ab4net on Sun, 05 Dec 2021 07:16:12 -0800
Remove Duplicates from Sorted List II
Source
Given a sorted linked list, delete all nodes that have duplicate numbers,
leaving only distinct numbers from the original list.
Example
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1->1->2->3, return 2->3.
Problem solution
The previous topic is to retain one of the duplicate value nodes. D ...
Posted by radman08 on Sun, 05 Dec 2021 07:01:31 -0800
L1-043 reading room (20 points)
TIANTI book reading room, please write a simple book borrowing statistics program. When readers borrow books, the administrator enters the book number and presses the S key, and the program starts timing; When the reader returns the book, the administrator enters the book number and presses the E key, and the program ends the timing. The book n ...
Posted by kellydigital on Sun, 05 Dec 2021 06:17:36 -0800