format

C++ variadic templates

Introduction

C++11 variadic templates are templates accepting any number of template parameters.

Boost::format string examples

Once boost::format object has been created with a format string and given arguments, there are two ways of getting a std::string (or std::wstring) from it. One is with boost::str() and the other way is with str() member method.

Read and write to file in C++

Many C++ developers find themselves in a place where they need to store information in an external file, which they can retrieve later to perform the operation based on the values. For instance, they have created a video game which has a high score system, wherein top 5 highest scores need to be saved in a file, as information saved in memory in real-time gets deleted once the program is turned off, so they would pursue a fast way to store their values in the external source.

How to fix the prev/next arrows image

After updating out WordPress installation and changing some fonts we’ve got some strange images instead of arrows on next/previous posts:  (U+F430) and  (U+F429).
arrows as utf images in wordpress
These images are utf-8 characters in the Private Use Unicode subset.

JSP tutorial : custom format

I’ve come around a problem when I needed to format DateMidnight date in JSP. Here I’ll explain 2 ways of doing this, where the other one applies only to joda.

Clean code

The book by Robert C. Martin “Clean Code” is a really very useful material for all programmers. You can disagree with him sometimes (as I do), but it still provides some useful notes that helped me to place my programmer experience and knowledge where they belong. Here I’ll provide some key notes that I did while reading the book and that I’d like to memorize.