命令 | 说明 + 示例 | |
---|---|---|
ds | 删除括号 | |
例 | ds " |
"Hello world!" =>Hello world! |
cs | 替换括号 | |
例 | cs "( |
"Hello world!" =>(Hello world!) |
cS | 替换括号,括号内文本做新一行 | |
例 | cS "{ |
"Hello world!" => { Hello world! } |
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
### generated by "brew bundle dump --describe" | |
tap "homebrew/bundle" | |
# Resource monitor. C++ version and continuation of bashtop and bpytop | |
brew "btop" | |
# Diff that understands syntax | |
brew "difftastic" | |
# Modern replacement for 'ls' | |
brew "eza" | |
# Command-line fuzzy finder written in Go |
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
grammar TAT; | |
// Lexer Rules | |
fragment Num: '0'..'9'; | |
Integer: ('1'..'9')Num+ | Num; | |
Float: Integer '.' Integer; | |
fragment Char: 'a'..'z' | 'A'..'Z'; |
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
[ | |
{ | |
"command": "projectManager.listGitProjects#sideBarGit", | |
"key": "cmd+o" | |
}, | |
{ | |
"command": "expand_region", | |
"key": "ctrl+=", | |
"when": "editorTextFocus" | |
}, |
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
/** | |
* 给一个字符串(是一段markdown文本),根据这个字符串生成出这段文本的目录结构 | |
*/ | |
/** | |
* 输入 | |
*/ | |
const input = `# Title h1 | |
hsh | |
## Title h2 sibling |
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
from functools import lru_cache | |
def construct_max(s: str) -> int: | |
# run in O(len(s)**2) | |
@lru_cache(None) | |
def dp(start, end) -> int: | |
num_s = int(s[start]) | |
num_e = int(s[end]) | |
if start == end: | |
return num_s | |
haha = 10**(end-start) |
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
/** | |
* 题目描述: | |
* 你在字节的面试中遇到了这样的代码。 | |
* 1. 这份代码的输出是什么? | |
* 2. 这份代码有什么问题?如何修复这个问题? | |
*/ | |
async function a() { | |
console.log('1'); | |
const z = new Promise((resolve) => { | |
console.log('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
// this problem is written by metis200, and can be found at https://github.com/metis200/FE-Exam | |
/** | |
* --- 问题描述 --- | |
* | |
* 实现一个 arrange 函数,可以进行时间和工作调度 | |
* | |
* --- 说明 --- | |
* | |
* - 本题需要自己实现测试用例 | |
* - 具体功能参考下列示例 |
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
type List<T> = null | { | |
head(): T; | |
tail(): List<T>; | |
}; | |
type Stream<T> = { | |
head(): T; | |
tail(): Stream<T>; | |
}; |
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
// statement https://lisperator.net/blog/a-little-javascript-problem/ | |
const push = (stack, value) => (first) => first ? stack : value; | |
const range = (left, right) => (left > right ? null : push(range(left, right - 1), right)); | |
const map = (stack, func) => (stack ? push(map(stack(1), func), func(stack(0))) : stack); | |
const foreach = (stack, func) => void map(stack, func); | |
const reverse = (stack, result = null) => stack ? reverse(stack(1), push(result, stack(0))) : result; | |
NewerOlder