1. Linux Using Notes

    Flush DNS cache

    sudo resolvectl flush-caches
    

    Install dynamic libs *.so

    After installing, use ldconf to refresh symbolic links and caches, or apps may not find your newly installed *.so.

    rsync vs scp

    They are similar tools but you may prefer to use one over another in certain cases:

    • scp is …
    Read more
  2. Tmux Notes

    Common Sense

    Tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time.

    Terms:

    • Session: A session can have multiple windows.
    • Window: A window …
    Read more
  3. C and C++ Learning Notes

    Deep Copy & Copy Constructor

    Default Copy Constructor

    The compiler also creates a copy constructor if we don’t write our own copy constructor. Unlike the default constructor, the body of the copy constructor created by the compiler is not empty, it copies all data members of the passed object to …

    Read more
  4. Tech Life Hacks

    Port Forwarding Using SSH

    Sometimes we are faced with the following situation:

    graph LR
      A(Computer A)-->|SSH|B(Server A 192.168.1.3)
      B-->|has access via 192.168.1.2:80|C(Server B 192.168.1.2)
      A-->|does not have access|C
    

    Computer A is …

    Read more
  5. VSCode Using Notes

    How to add "Program Files" in VS Code settings

    Use "C:\Program Files\..." or C:\"Program Files"\...

    How to write MATLAB scripts in VSCode

    However, I find it not a good idea. The terminal crashes from time to time and Workspace in MATLAB cannot be integrated into vscode.

    The main …

    Read more
  6. Git Learning Notes

    Workflow

    When using git to collaborate with others, the following workflow should be taken:

    1. git checkout main to switch the local branch to main.
    2. git pull origin main to pull the remote main branch to the local branch to catch up the work.
    3. git checkout -b newLocalBranchName to create a …
    Read more
  7. Matlab Learning Notes

    Docs: MATLAB Help Center

    Table Related

    How to filter a table

    theTable(theTable.VariableName == 0, :);
    

    returns a table that contains every row in theTable whose VariableName == 0.

    Remove Rows from Table

    Docs

    This removes rows with row id 3,5,7 from the table.

    table([3,5,7],:)=[];
    

    Things Unique …

    Read more

Social