1. Global Git Ignore File

    There are some files that shouldn't be tracked by Git at all. For example, the temporary files created by the text editors, the Python bytecode, and etc.

    How could we ignore those files? In the previous post, I have mentioned that we can create a .gitignore file and list the …


  2. Comparison and Sorting in Python3

    Although I have written Python for several years, I am still not very familiar with its idioms. In particular, I don't quite understand how to compare and sort the objects in Python. That's the reason why I am writing this article.

    The rest of this article consists of following sections …


  3. Troubleshooting adb No Permissions Problem

    I got an Android Nexus 7 (2013, Wi-Fi) device a short while ago. I attached the device to my computer and tried to list the devices with adb devices command. But, unfortunately, I got the following error message:

    $ adb devices
    List of devices attached
    ????????????    no permissions

    In the following of …


  4. Grub Install and Btrfs Root File System

    Recently, the Linux operating system on my laptop no longer boots. It seems that the boot sector for GRUB bootloader is corrupted. I tried to reinstall GRUB with an Ubuntu LiveCD; however, I have encountered some problem related to Btrfs file system (which is the file system for my root …


  5. Check Code Coverage with Clang and LCOV

    Code coverage is a metric to show the code being untested. It can be considered as a hint to add more test cases. When we are writing C/C++, the most notable code coverage testing tool is gcov, which is a GCC built-in coverage testing tool. Besides, we can collect …


  6. Trace Source Code with Vim and Ctags

    Ctags is a source code indexing tool. With ctags, we can easily find the definitions of the classes, functions, and variables. According to my experiences, ctags can significantly reduce the time to browse the source code. In this post, I would like to give a brief introduction to ctags and …


  7. Git Ignore File

    In some circumstances, we would like to ignore the files (or directories) under the Git repository base directory. How could we do this? For example, assume that we have a Git repository with following files:

    conv …


  8. Using Aria2 Download Manager

    I used to download the large files with wget because I can simply resume the download tasks with -c option. This option will check the size of the output file, and download the rest of the file from the server. I can even restart the download task with a different …


  9. C++11 Unique Pointer

    C++11 introduced three new smart pointer class templates: std::unique_ptr, std::shared_ptr, and std::weak_ptr. These smart pointer class templates are designed to replace the old std::auto_ptr smart pointer, which is known to have some defect and deprecated now. In this post, I would like to give a …


  10. C++ std::multimap and Equal Range

    Today I have encountered a problem: Given that there are multiple equivalent keys in an instance of std::multimap, how could we list all of the corresponding values? For example:

    #include <map>
    #include <iostream>
    int main() {
      std::multimap<int, int> xs;
      xs.insert(std::make_pair(1, 12));
      xs.insert(std …


« Prev Page 2 / 5 Next »