Author | Logan

  1. 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 …

    More

  2. 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 …

    More

  3. 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 …

    More

  4. 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 …

    More

  5. 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:

    out/bin/conv
    preprocessed/out/gen-case1.h
    preprocessed/out/gen-case2.h
    preprocessed/input.txt
    conv …

    More

  6. 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 …

    More

  7. 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 …

    More

  8. 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 …

    More

  9. Waliki Installation

    Waliki is a simple wiki app for Django. We can write wiki contents with reStructuredText and the contents will be stored in a Git repository. In this post, I would like to introduce the instructions to install Waliki.

    Getting Started

    First, install the related Ubuntu packages:

    $ sudo apt-get install git …

    More

« Prev Page 4 / 7 Next »