Multiple companies are selling RO (Reverse Osmosis) based water purifiers these days, and all of them will have some confusing diagram to accompany their product so that you are forced to call an electrician or a support guy to fix stuff which is actually very...
So you got yourself access to a Debian server (or virtual private server) and have logged into it by one way or the other. In this tutorial, we will learn how to set up such a bare-bones server so you can access it remotely via...
A generic factory is a factory that can register any class type. It is very easy to write because we are allowed to use void pointers.
void Register(const std::string _key, const std::function<void *()> _creator)
m_creators[_key] = _creator;
ClassType* Get(const std::string _key) const
return static_cast<ClassType *>(m_creators.at(_key)());
std::map<std::string, std::function<void *()> > m_creators;
Derived1 *d1 = f.Get<Derived1>("Derived1");
Derived2 *d2 = f.Get<Derived2>("Derived2");
Derived1 *d2 = f.Get<Derived1>("Derived2"); // This also compiles!!!
As we are simply casting a void pointer, it is left to the developer to ensure...
Problem statement: Find the largest sum that is possible in an array. I.e., find the maximum sub-array. Solution: From the very first this problem looks complicated because of how it is framed. It sounds like we want to find the MAXIMUM from ALL THE POSSIBLE...
This PDF was submitted to BITS PILANI Work Integrated Learning Program 2019 Object Oriented Analysis and Design (S2_18_SSZG514) for the final assignment.
Since Manjaro is based on Arch, we can surely use pacman to install node.js and npm. But true freedom of npm can be easily enjoyed without needing root access all the time.
‘C++ Traits’ is an idiom that allows a great level of abstraction at compile time which is normally possible only by a combination of inheritance and composition. It allows an algorithm to change its behavior depending on the object’s traits, i.e., functions and member variables...
In my previous post, I gave the rather simple steps to install MSYS2/Mingw-w64. Now I will tell you how to install a custom library, specifically log4cxx. Before starting, lets acknowledge that there are other libraries that might fit your logging needs. The installation steps will...
Okay… first of all… There are multiple packages and tutorials available to get one or the other working on Windows 10. This tutorial focuses on how to create a comfortable maintainable compiler environment that can be used for a long time. If you want to...
There are two ways to get Microsoft Office Developer Tools/VSTO for Visual Studio 2013: Download Visual Studio Tools for Office that works with Visual Studio 2013. As of today, file to be downloaded is “cba_bundle.exe“. Download Web Platform Installer (WebPI). File name is “wpilauncher.exe“. This is basically a...