Monthly archive for 2018/06

Notes on C++ class constructor and destructor

5 minute read

In this posts, I will list some notes that I think they worth to be reminded when mentioning about classes’ declaration, constructor, and destructor. 1. In-class member function is inline function If you define a method member inside the class declaration such as class People { string first_name() {return _fname;} string last_name(); } string People::last_name {return _lname;} Then first_name() function will be an inline function by default while the function last_name() is not. Remember the good and the bad of an inline function. On the good side, an inline function can remove the overhead of the function calling mechanism, thus, i...

Jekyll custom plugins in Github page

2 minute read

Github page, which uses Jekyll as it static site generator, is a very convenient way to host a personal website. However, Github only supports some official plugins they listed, to use other plugins, you have to build the site yourself. In this post, I would like to discuss their difficulties and how to overcome them. Problems The first problem is, of course, Github does not support custom plugins and they have a valid point to do so - security. Allowing arbitrary code to run on their server is somewhat vulnerable and they don’t want to do so. Hence, I do not expect them to change that anytime soon. However, some plugins are really helpful...

Back to top ↑