Category: Uncategorized
-
Bring Your Animations to H264/HEVC Video
Table of Contents Introduction Red Video One JPEG Video Two JPEG Video Text Animation Video Introduction Last year, I introduced a single header windows-based software-based video encoder for OpenGL that works on Windows 7 and above. See the above video demo! I have decoupled it from the OpenGL thread and make it simpler to […]
-
What Web Developers Need to Know About Content Security Policy
Introduction Content Security Policy (CSP) is a computer security standard introduced by the World Wide Web Consortium (W3C) to prevent cross-site scripting (XSS) and clickjacking attacks. Explained simply, CSP is a whitelist of origins of content that is allowed to load or execute on a webpage. We’ll look at the three versions of CSP and […]
-
Bring Your C++ Code to the Web
Table of Contents Introduction Installing Windows Subsystem For Linux Installing Emscripten Hello World Programs Calling JavaScript Code from C/C++ Calling C/C++ code from JavaScript Cross Platform Introduction WebAssembly’s predecessor, asm.js converts C/C++, Rust code into a low level JavaScript to run on the web browser. The unveiling of WebAssembly on March 2017 has enabled […]
-
C++23: fullptr to replace nullptr
Coming in C++ 2023, detailed in the AF0401 proposal, fullptr_t is fully recommended as the invalid pointer type to replace current nullptr_t which first standardized in C++11. nullptr is defined as a pointer value with all its bits set to zeroes while fullptr has its bits set to ones (the address of the last addressable […]
-
Countries of Top 200 CodeProject Members
Note: the data is taken at 2019-01-26. In CodeProject, a place where like-minded programmers share knowledge: There are 2 main ways to gain reputation points, either by answering questions in the Quick Answers section or writing quality articles. A third way to gain points is to post a good comment/message in forum or article thread […]
-
UWP Storage Wrapper
Introduction UWP Storage is a persistent name-value storage API for UWP apps. This article showcases a wrapper written in C++/CX that makes it easier to use in C++/CX. Though C# usage is already easy without the wrapper, the comparison of both with and without wrapper are still shown. C++/CX Writing and Reading Primitive Value In […]
-
C++11 std::div() Benchmark
Download source at Github Update: rand() overhead in benchmark has been removed by filling the array with random values beforehand. C++11 standard introduces std::div() and its siblings on the premise of some compiler can take advantage of the available machine code that compute quotient and remainder of division together. The C++ reference noted, and (updated) […]
-
Not Every Memory Allocation Failure is OOM
Introduction As with many C++ programmers with C background, bring their C habits to C++ programming as shown in the below code where a massive array is allocated and pointer is then checked for failed allocation in presence of null address. It works this way for C malloc. Unfortunately, C++ new does not work like […]
-
H264 Video Encoder for OpenGL
Download the source from GitHub Though this long article has more lines than the encoder library itself, this is a very simple and easy to read and understand article. If you have read my other articles before, you will be comfortable to know I do not write complicated stuff. Table of Contents Introduction Running the […]