「 Article 」 March 11, 2020

npm or yarn

Words count 1.3k Reading time 1 mins. Read count 1000000

Both yarn and npm are the package management of node.

npm is the default package management of node, whereas yarn is developed by Facebook team.

But yarn has the same package registry with npm , which means yarn and npm actually retrieve packages from the same server.


  • Install packages one by one
  • Easy...
Read article

「 Article 」 March 08, 2020

Customize and handle a Promise

Words count 2.1k Reading time 2 mins. Read count 1000000

Promise is a very common object that web developers constantly face when developing website.

According to MDN, The Promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.

To build a promise...

Read article

「 Article 」 March 08, 2020

Difference? var, let and const

Words count 2.8k Reading time 3 mins. Read count 1000000

var variables can be redefined or updated.

    var width = 100;
    console.log(width); // 100
    var width = 200;
    console.log(width); // 200

Same variable name would not result in error.

they’re function scope, which means that they are only available inside...

Read article

「 BLOG 」 November 30, 2019

Build your own Blog and host in Github

Words count 6k Reading time 5 mins. Read count 1000000

Building own blog is benefitial for seeking a job, especially a CS related job. It records your achievements and reflects your learning journey. In addition, you can use blog to share your ideas and make friends. This post shares my experience establishing...

Read article

「 ALGORITHMS 」 November 30, 2019

Shuffle

Words count 335 Reading time 1 mins. Read count 1000000

  • Shuffle(Python)
from copy import deepcopy
from random import randint


def shuffle(lst):
    temp_lst = deepcopy(lst)
    m = len(temp_lst)
    while (m):
        m -= 1
        i = randint(0, m)
        temp_lst[m], temp_lst[i] = temp_lst[i], temp_lst[m]
    return temp_lst
Read article

「 TEST 」 November 29, 2019

Test Post

Words count 1.4k Reading time 1 mins. Read count 1000000

{
  "x": 123,
  "d": 333
}
  • Write the press release
  • Update the website
  • Contact the media

Test link

Build your own Blog Read article
0%