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
function toUnderscore(string) { | |
return string.toString().split(/(?=[A-Z])/).join('_').toLowerCase(); | |
}; |
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
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__footer:hover .vuepress-plugin-demo-block__expand::before, | |
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__footer:focus .vuepress-plugin-demo-block__expand::before, | |
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__footer:visited .vuepress-plugin-demo-block__expand::before { | |
border-top-color: #2B66C4 !important; | |
border-bottom-color: #2B66C4 !important; | |
} | |
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__footer .vuepress-plugin-demo-block__expand::before, | |
.vuepress-plugin-demo-block__wrapper .vuepress-plugin-demo-block__footer svg { | |
transition: all .2s ease; |
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
# _/_/_/_/ _/_/_/ _/_/_/ | |
# _/ _/ _/ _/ | |
# _/_/_/ _/_/_/ _/ | |
# _/ _/ _/ _/ | |
# _/ _/_/_/ _/_/_/ | |
_COLUMNS=$(tput cols) | |
_MESSAGE=" FBI Warining " | |
y=$((($_COLUMNS - ${#_MESSAGE}) / 2)) | |
spaces=$(printf "%-${y}s" " ") |
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
class LruCache { | |
constructor(maxsize) { | |
this._cache = {}; // 缓存 | |
this._queue = []; // 队列 | |
this._maxsize = maxsize; // 最大值 | |
// 如果最大值输入非法 默认无限大 | |
if (!this._maxsize || !(typeof this._maxsize === 'number') || this._maxsize <= 0) { | |
this._maxsize = Infinity; | |
} |
NewerOlder