This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-09-04T06:52:38.927Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 判断是否为isNaN | |
let n1 = NaN | |
let n2 = 'NaN' | |
console.log(Number.isNaN(n1)) | |
console.log(Number.isNaN(n2)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo nginx -s start | |
sudo nginx -s reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 新增SSH Key | |
$ ssh-keygen -t rsa -C "youremail@example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33333444444 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getDay()返回一星期中的某一天(0-6) | |
getDate()返回一个月中的某一天(1-31) | |
getDate (date) { | |
return { | |
year: date.getFullYear(), | |
month: date.getMonth(), | |
day: date.getDay(), | |
date: date.getDate() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 單行聲明變量 | |
let x = 5, y, z = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## null 表示無值 | |
## undefined 表示沒有定義的變數 | |
##變數設定為- undefined | |
bartimer = void 0; | |
##判斷變數如果不為undefined,則變數設定為undefined | |
if (typeof bartimer != 'undefined'){ | |
bartimer = void 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 取代全部 | |
let dd = '2019-08-31 16:57:46' | |
dateVal = dateVal.replace(/-/g, '/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##去除數字後多除0 | |
$disPrice = rtrim(rtrim($disPrice, '0'), '.'); |
NewerOlder