[Leetcode] 104. Maximum Depth of Binary Tree

摘要: 1 int depth = 0; 2 int currentMaxDepth = 0; 3 public int maxDepth(TreeNode root) { 4 if(root == null){ 5 return 0; 6 } 7 8 int leftDepth = 1; 9 int rightDepth = 1; 10 11 leftDepth += maxDepth(root.lef 阅读全文
posted @ 2019-12-08 11:38 seako 阅读(303) 评论(0) 推荐(0)

三元運算子回傳lambda expression

摘要: 紀錄一下系列,比較細、片段的東西 阅读全文
posted @ 2019-11-15 10:41 seako 阅读(184) 评论(0) 推荐(0)

[個人紀錄] postgre dump出table 再用psql還原

摘要: --dump tablepg_dump --host #server --port 5432 --username #username --format plain --ignore-version --verbose --file "C:\temp\filename.backup" --table 阅读全文
posted @ 2019-11-15 10:41 seako 阅读(279) 评论(0) 推荐(0)

[LeetCode] 4. Median of Two Sorted Arrays

摘要: 題目連結 悲慘的效率 討論內有一篇 Share my O(log(min(m,n)) solution with explanation 為了解決這個問題,我們需要了解"什麼是中位數",統計上,中位數是用於分割一個集合為兩個等長的子集,其中一個子集總是大於另一個。如果我們了解中位數的分割方法,我們離 阅读全文
posted @ 2019-11-15 10:15 seako 阅读(81) 评论(0) 推荐(0)

[個人紀錄] RabbitMQ安裝

摘要: 參考資料 https://blog.csdn.net/tjcyjd/article/details/77150893 https://blog.csdn.net/u014308482/article/details/53994401 https://blog.yowko.com/2017/05/in 阅读全文
posted @ 2019-11-15 10:12 seako 阅读(260) 评论(0) 推荐(0)

[Silverlight 4] Textbox style模擬Textblock 使可以選取、複製

摘要: childwindow 做為訊息視窗,使用textblock,可是textbloc無法選取內容及複製, 就改用textbox假裝成textblock 原本的textblock <controls:ChildWindow x:Class="ManageBack.Controls.MessageWind 阅读全文
posted @ 2019-11-15 10:11 seako 阅读(124) 评论(0) 推荐(0)

[Silverlight 4] 參數的傳遞方法

摘要: Silverlight都會有一個專案叫 *.Web,有個ManagePage.aspx裝戴Silverlight元件,也是應用程式的入口 然後還會有一個專案(此處叫ManageBack),會編譯成Silverlight .xap元件,供上面裝戴 ManageBack的App.xaml可提供應用程事週 阅读全文
posted @ 2019-11-15 10:10 seako 阅读(151) 评论(0) 推荐(0)

[個人紀錄] regular 搜集

摘要: 判斷有理數 ^(0|[1-9]([0-9]{1,5})?)((\.(([0-9]{1,5})?[1-9])))?$ 阅读全文
posted @ 2019-11-15 10:08 seako 阅读(75) 评论(0) 推荐(0)

[個人紀錄] git 疑難排解

摘要: 1.git pull 時發生錯誤,要拉下來的檔案內含有檔名太長的檔案 ans: https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows git config --system core.lon 阅读全文
posted @ 2019-11-15 10:08 seako 阅读(84) 评论(0) 推荐(0)

[個人紀錄] git 設定

摘要: -- git history git config --global alias.history "log --graph --all --pretty=format:'%C(bold blue)%H%Creset %C(bold green)%ai%Creset %C(bold cyan)(%ar 阅读全文
posted @ 2019-11-15 10:08 seako 阅读(139) 评论(0) 推荐(0)