- Algorithm
- Search——Implementation of various search algorithms, as well as unit testing and performance testing based on Google benchmark;
- std_search_examples——Example of search algorithm in stl;
- Sort——Implementation of various sorting algorithms, as well as unit testing and performance testing based on Google benchmark;
- std_sort_examples——Example of sorting algorithm in stl;
- Search——Implementation of various search algorithms, as well as unit testing and performance testing based on Google benchmark;
- BinaryTree——Related operations of binary trees, insert, remove, find, and print;
- Breakpad——A simple package of google breakpad;
- Byte order——Judge the endianness of the system;
- Client——A simple Linux select socket client;
- CountDownLatch——Simple countdown latch (std::latch c++20) implemented using std::mutex and std::condition_variable;
- Crashpad——Simple encapsulation of google crashpad;
- Curl——Simple use of curl;
- TcpClient——Simple tcp client implemented using curl;
- HttpClient——Simple http synchronization client implemented using curl;
- HttpClientAsync——Simple http asynchronous client implemented using curl;
- Design pattern——Some examples of design patterns;
- Factory——Factory model;
- MVC——MVC mode;
- Observer——Observer mode;
- Singleton——Singleton mode;
- GlobMatch——Simple implementation of glob pattern matching;
- Hawthorn——Google glog example;
- Icmp——Simple encapsulation of linux icmp protocol;
- LinkedList——Related operations of linked lists, insert, remove, invert, and print;
- Memcpy——
memcpy
Function implementation; - Is a monitor——windows(
ReadDirectoryChangesW
),macos(FSEvents
) and linux(fanotify
andinotify
) Simple examples of directory monitoring;fanotify
Used inglobal
Mode, infanotify_mark
JoinFAN_MARK_FILESYSTEM
(needCAP_SYS_ADMIN
ability, that is, root permissions)flag
, All events on the specified file system can be monitored, and then the required events can be filtered according to the specified monitored folder directory. This function is moreinotify
More powerful;- Get the upper path where the event file is located, using
open_by_handle_at
This method will appear under ordinary usersOperation not permitted
Error, also requiredCAP_SYS_ADMIN
Ability, that is, root permissions; - It is recommended to use root permissions to run. If you must run it under normal users, it is recommended to use it.
inotify
Insteadfanotify
, open a monitoring file descriptor (fd
) cannot be achievedsubtree
monitor;
- Get the upper path where the event file is located, using
- MonitorDir_EFSW——A simple example of directory monitoring implemented using efsw;
- OpenSSL——Some examples of openssl;
- aes——Aes encryption and decryption example;
- base64——Example of base64 encoding and decoding;
- hash——Sha256 example;
- hmac——The example of hmac;
- pem——Example of pem format;
- rsa——Example of rsa encryption and decryption;
- SM4——Example of sm4 encryption and decryption;
- Dirt 09——Example of x509 certificate;
- bash——Example of the openssl command line;
- SafeCallback——Implementation of life cycle safe callback function, referencemuduo WeakCallback;
- Server——Some examples of linux server;
- server_epoll——The example of epoll;
- server_poll——A example of poll;
- server_select——Select example;
- SpinMutex——Simple mutex and spin lock implemented using std::atomic_flag;
- Thread——Thread class based on std::thread implementation, including thread pool;
- Thread——Thread class;
- ThreadPool——Thread pool;