原创 Ubuntu18.04工作區設置

原Ubuntu18.04的workspace功能是已經默認開啓,當你只使用了一個的時候,系統就是會留出一個空白的workspace,所以這個正常狀態下只會顯示兩個 如果在第二個workspace上也打開一些文件,那麼系統就是自動爲你開闢一

原创 pycharm.2019.03.03-專業版激活

http://idea.medeming.com/jets/  一次不成功可以多嘗試幾次。 2020年03月14日試驗使用可至2021/02/18

原创 vscode同步設置

1.github -》 Setting -》Developer Settings -> Personal Access Tokens -> Generate New Tokens  Copy the token! Like: ------

原创 leetcode-112. Path Sum

思路:判斷只有當前節點是葉子節點並且結點的值等於暫時sum的值時才確定這是一條滿足要求的路徑.擁有一條這樣的路經就返回真,所以對左右子樹的判斷結果取活運算. class Solution { public: bool hasPa

原创 CPP_STL總結

Overview of the STL The STL is logically divided into six pieces, each consisting of generic components that interope

原创 SQL中的幾種連接

id name id name -- ---- -- ---- 1 Pirate 1 Rutabaga 2 Monkey 2 Pirate 3 Ninja 3 Dar

原创 Leetcode 19. Remove Nth Node From End of List

第一次做這道題的時候使用的方法是:先掃描鏈表一次統計其長度len,再使用一個指針遍歷鏈表,從頭節點向後走len-n-1步,恰好指向待刪除節點的前一個節點再做處理。遇到待刪除節點爲頭節點——即n==len的情況單獨處理。 第二次做這道

原创 程序的內存佈局

進程的內存佈局 1.代碼段 存放程序的可執行代碼。 2.只讀數據段(RO data) 存放不需要被更改的數據 3.已初始化讀寫數據段(RW data) 存放在程序中聲明的,並且具有初始值的變量。程序執行時應位於可讀寫的區域,並具

原创 git-bug-“refusing to merge unrelated histories”

git checkout master git merge origin/master --allow-unrelated-histories Resolve conflict, then git add -A . git com

原创 lower_bound的使用

unction template <algorithm> std::lower_bound default (1) template <class ForwardIterator, class T> ForwardIterator

原创 在vector查找某元素

#include<iostream>#include<algorithm>#include<vector>using namespacestd; vector<int>array(100);//整型的array數組 int main(

原创 B樹和B+樹的區別

B-樹        是一種多路搜索樹(並不是二叉的),一顆m階的B-樹,或爲空樹,或者:        1.定義任意非葉子結點最多隻有M個兒子;且

原创 find命令的學習使用

1.      find . -print      # 打印文件和目錄的列表 2.    find . -name "*.stackdump" | xargs rm #查找後綴名爲stackdump的文件並刪除 3. fin

原创 remove_if的使用

Removes all elements satisfying specific criteria from the range [first, last) and returns a past-the-end iterator for

原创 “Unable to write program user data” when invoking VS Code as git editor

SOLVED by deleting the Code directory from /home/MyUserDirectory/.config and then re-starting VScode from the menu. To