V.Lo Notes

I write down what I've learned


  • Home

  • About

  • Tags

  • Categories

  • Archives

[ES6]Promise使用-抓資料

Posted on 2018-01-29 | Edited on 2018-08-18 | In JavaScript | Comments: 0
最近在為公司專案寫單元測試,發現了很多之前沒注意到的坑。在爬資料取值時,有非同步的問題,一載入程式碼就做測試,資料都還沒爬回來,一定會報錯,這時如果使用 Promise 可以很輕易解決此問題。  MDN 說明Promise 會代理一個建立時,不用預先得知的值。它使你能夠繫結(associate)著 ...
Read more »

[TypeScript]Union Type & Type Guard

Posted on 2018-01-19 | Edited on 2018-08-18 | In JavaScript | Comments: 0
最近寫公司專案時,常常遇到需要接收不同資料格式的情況,因為不想在另寫功能相仿的 function,導致重複的程式碼,這時 TypeScript 的 Union Type 與 Type Guard 就派上用場了。 原本 TS 的型別檢查是像這樣子的: 1234567interface Param & ...
Read more »

[Leetcode]83. Remove Duplicates from Sorted List

Posted on 2017-11-15 | Edited on 2018-08-18 | In Leetcode | Comments: 0
58. Length of Last Word 題目連結 難易度:Easy Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1 ...
Read more »

[Leetcode]58. Length of Last Word

Posted on 2017-11-03 | Edited on 2018-08-18 | In Leetcode | Comments: 0
58. Length of Last Word 題目連結 難易度:Easy Given a string s consists of upper/lower-case alphabets and empty space characters ‘ ‘, return the length of l ...
Read more »

[Leetcode]583.Delete Operation for Two Strings

Posted on 2017-10-11 | Edited on 2018-08-18 | In Leetcode | Comments: 0
583.Delete Operation for Two Strings 題目連結 難易度:Medium Given two words word1 and word2, find the minimum number of steps required to make word1 and wo ...
Read more »

[Leetcode]257.Binary tree paths

Posted on 2017-09-23 | Edited on 2018-08-18 | In Leetcode | Comments: 0
退伍一個多月了,也開始進入職場上班,自己覺得進入了一個不錯的地方,待遇及工作環境都很滿意,尤其可以接受到很多挑戰,像是每週刷兩題leetcode出來大家討論,對於我這種資料結構、演算法都極差的碼農來說,真的是一大挑戰,因此決定於此紀錄寫題心得。 257.Binary tree paths 題目連結 ...
Read more »

[DB]MongoDB筆記

Posted on 2017-05-06 | Edited on 2018-08-18 | In Database | Comments: 0
mLab這次學習NoSQL的資料庫MongoDB,由於不想在電腦上浪費空間,便轉往尋找雲端方案mLabmLab提供500MB免費的儲存空間,我想對於學習的使用者來說非常足夠。 如何連線先於mLab網站註冊免費帳戶,並新增database使用者採用第三方node.js模組 moongoose 來方便操 ...
Read more »

[JS]實作LinkedList鏈結串列

Posted on 2017-02-04 | Edited on 2018-08-18 | In JavaScript | Comments: 0
由於自身資料結構的基礎薄弱,買了一本JavaScript資料結構與演算法實作的書來看,重新把LinkedList鏈結串列學習了一遍,並用JS實作出來。 LinkedList鏈結串列要存放多個元素,最常用的資料結構可能是陣列,但是在大多數語言中,陣列的大小是固定的,要從陣列中插入項目或移除項目的成本很 ...
Read more »

這五個月的實習心得

Posted on 2016-07-25 | Edited on 2018-08-18 | In Intern | Comments: 0
工作的早晨,McDonald早餐和冰美式是我一天絕佳的動力來源。 前言2016-03-01~2016-07-29。實習了整整五個月,接到兵單剎那,就知道我該離開了,8/4準時入伍。 因為好久沒有記錄實習心得與過程了,這篇就來完整地寫下我這五個月的經歷吧,以後回憶起來想必也是很精彩的。 先說說我的背景 ...
Read more »

[Git]為專案開Branch

Posted on 2016-06-28 | Edited on 2018-08-18 | In Git | Comments: 0
最近在公司有比較多的時間自主學習,常常想在專案上開發不同版本或測試新功能,但是一直複製資料夾也不是個長遠的解決辦法,於是卯起來學習Git Branch。話說回來,開Branch應該是git 版本控制最重要的功能了,我居然拖到現在才去學習… Git Branch要為專案開發新功能、重構程式碼、或想測試 ...
Read more »
1…4567
Vic Lo

Vic Lo

61 posts
11 categories
36 tags
GitHub
© 2022 Vic Lo
Powered by Hexo v3.7.1
|
Theme – NexT.Gemini v6.4.0