Articles in the note category

  1. cin vs getline vs cin.getline

    cin vs getline vs cin.getline

    Case with '\n'


    drop all `'\n'` except last one (just leave it in the buffer,won't get it and will finally drop it).


    read until `'\n'` and replace `'\n'` with `'\0'`.


    same with getline, replace `'\n'` with `'\0'`.
    but …
    Tagged as : C++ program
  2. config git

    Git saves your system config in /etc/gitconfig , user config in ~/.gitconfig or ~/.config/git/config and repository config in .git/config

    Each config will override the previous one so the repository config will override the other config

    Config your username and email:

    $ git config --global "fx-moon"
    $ git …
    Tagged as : git
  3. Very Simple Powershell

    Basic Powershell




    $null -> null value

    $true -> boolean true

    $false -> boolean false

    $_ -> the variable currently being processed

    Data Structure


    $var[email protected](<element>,<element>,...)

    Hash Table

    $var[email protected]{<key>=<value>,...}

    Process Control


    else …
    Tagged as : powershell
  4. boost learning note (2) Boost.Core


    The Boost.Core library is a collection of core utilities. The criteria for inclusion is that the utility component be:

    • simple
    • used by other Boost librarys, and
    • not dependent on any other Boost modules except Core itself, Config, Assert, Static Assert, or Predef.



    The header <boost/core …

    Tagged as : boost
  5. boost learning note (1) getting started on Windows

    1 Get boost

    just find a copy on

    2 The boost distribution

    boost_1_67_0\ .................The “boost root directory”
       index.htm .........A copy of starts here
       boost\ .........................All Boost Header files
       lib\ .....................precompiled library binaries
       libs\ ............Tests, .cpps, docs, etc., by library
         index.html ........Library …
    Tagged as : boost
  6. try pelican

    try pelican

    I just forget the usage again and again,so I decided to WcRoIpTyE it=.=

    getting start


    Pelican currently runs best on Python 2.7.x and 3.3+; earlier versions of Python are not supported.

    You can install Pelican via several different methods. The simplest is via …

    Tagged as : pelican
  7. git learning note

    git learning note

    git init

    This creates a new subdirectory named .git that contains all of your necessary repository files — a Git repository skeleton. At this point, nothing in your project is tracked yet.

    git add

    If you want to start version-controlling existing files (as opposed to an empty directory …

    Tagged as : git