We installed a widget that displays our instagram photos on our blog sidebar at blog.mimoco.com . Its a nice widget called “BadgePlz”. But sadly this widget is definitely malware. It will periodically redirect your users to porn sites. It appears…
Getting the serial number for a USB Serial drive on Os X is tricky just like it is to get a USB serial number on Windows. We want to get the serial number of a USB Flash disk that is…
Programmers are often advised not to overload global operator new, and to stick to overloading just class specific operator new. The arguments against are many, but they basically boil down to that it is difficult to do it correctly. But…
Getting the serial number of a USB device in Windows is a lot harder than it should be. ( But it’s a lot easier than getting the USB serial number on Os X!) It is relatively simple to get USB…
A functor is an object that works like a function. That is it overloads operator(). They are useful when you need to create a series of functions each of which works mostly the same way, but you want that instance…
Implementing a portable framework for multi-threading doesn’t have to be difficult or error prone. With the right framework, implementing multi-threaded programs can be pretty simple, and you can hide all the platform dependent functions. You can also implement your threading…
There are good standard ways of generating 32-bit random numbers. If you need something really simple, it is possible for example to generate decent random numbers with a Linear Congruential Random Number Generator:
I’ve been working on a C++ interface to Berkeley DB to support some ongoing projects. The goal is to create an interface that allows me to store serialized C++ objects in a database. Each object is flattened into a text…
I’m starting to code up a simple MySql connector class. Here is the code for the class. First the header:
There are three basic steps to getting this done, trapping signals, getting the stack frames, and then demangling the c++ symbols. Trapping Signals When a program crashes the operating system will sent it a signal, to give it one last…