原创 LeetCode常用算法以及優化方法總結

LeetCode算法常用算法優化方法cutrecordorderpattern歡迎使用Markdown編輯器新的改變功能快捷鍵合理的創建標題,有助於目錄的生成如何改變文本的樣式插入鏈接與圖片如何插入一段漂亮的代碼片生成一個適合你的

原创 C++ vector 刪除

一般來講erase用得比較多,不注意也容易踩坑,例如:  vector<int> vec{1, 4, 3, 2, 5, 2};      for(auto it = vec.begin(); it != vec.end(); it++)

原创 C++ operator重載

priority_queue<vector<int>, vector<vector<int>>,cmp1> q;  struct cmp1 { bool operator()(vector<int> &x, vector<int

原创 find element with max value from std::map

Taken from here: auto x = std::max_element(m.begin(), m.end(), [](const pair<int, int>& p1, const pair<int, int>&

原创 caffe之prototxt解析

要運行caffe,需要先創建一個模型(model),如比較常用的Lenet,Alex等, 而一個模型由多個屋(layer)構成,每一屋又由許多參數組成。所有的參數都定義在caffe.proto這個文件中。要熟練使用caffe,最重要的就是

原创 STL 常用

multiset<int> s; s.erase(2); // 刪除所有2 s.erase(s.lower_bound(2)); //迭代器位置刪除第一個2 string str = "-0123456789"; long a = s

原创 C++ map 查詢 插入

定義pair的key map<pair<int, int>, double> hashMap map查詢是否成存在key使用.count返回0/1 if(hashMap.count({a, b}) == 0) pair的key直接{a

原创 LeetCode

STL使用 http://c.biancheng.net/stl/map/    數組 字符串 隊列 堆 棧 鏈表 哈希表 二叉樹 平衡樹  unordered_map map set dequeue aoto 操作符重載 compare

原创 LeetCode刷體總結

無重複字符的最長子串 最長迴文子串 刪除鏈表的倒數第N個節點 有效的括號 移除元素 // 邊界判空size() == 0 下一個排列 // 解題思路處理順序 旋轉圖像 合併區間 // 自定義排序 sort(vec.begin()

原创 git stash保存修改

本地有修改如果更新代碼會有衝突,可以利用git stash保留當前的修改 (1)git stash save "save message"  : 執行存儲時,添加備註,方便查找,只有git stash 也要可以的,但查找時不方便識別。 (

原创 啓動tensorboard

activate tensorflow tensorboard --logdir=logs 最後一行的ip地址,http://127.0.0.1:6006,將其複製到Google瀏覽器即可打開

原创 Tensorboard學習

https://blog.csdn.net/fendouaini/article/details/80344591

原创 Python if...else三元表達式

x = condition ? a : b  在Python爲: x = a if condition else b   ref: https://blog.csdn.net/u011973222/article/details/7992

原创 python with as用法

這個語法是用來代替傳統的try...finally語法的。  with EXPRESSION [ as VARIABLE] WITH-BLOCK  基本思想是with所求值的對象必須有一個__enter__()方法,一個__exit__(

原创 jvm垃圾回收

https://www.cnblogs.com/wabi87547568/p/5282892.html   https://www.cnblogs.com/1024Community/p/honery.html