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 …

Thinking Within the Box

No, your eyes aren’t playing tricks on you. You have not misread it. The blog title is not a typo! It is, in fact, intentional. I assure you this is not a click bait. It is not thinking outside the box but thinking within the box, per se. These two approaches couldn’t be more different, …

Floating Point and Integer Arithmetic Benchmark

Introduction This is not much of a tip, just a posting of benchmark result to compare integer and floating point arithmetic timing. All the integer and floating point types used in Benchmark are 64bit. Timing is based on looping 100 million times. Clarification: SmallInt and SmallDouble refers to small values (10-10000) stored in int64_t and …

C++: Simple Permutation and Combination Parallelism

Primary Motivation Single Threaded Permutation Multi-Threaded Permutation Single Threaded Combination Multi-Threaded Combination Primary Motivation My Github repository, Boost Concurrent Permutations and Combinations on CPU, has been up since January 2017. However, download is close to none while my older single threaded next_combination has plenty of downloads. So I figured it must be the code usage …

Improved Next Combination with State

To speed up next_combination, we can store the state of generated combination so that it does not have to find which current combination elements correspond to the bigger collection. One way to do it is to store this state inside a class but this violates the design of STL algorithms. Another way to do it, …