-
安装 corkscrew 软件,mac 系统可以直接使用 brew 安装
brew search corkscrew brew install corkscrew
-
配置 ssh,编辑
~/.ssh/config
文件,添加 ProxyCommand 配置
安装 corkscrew 软件,mac 系统可以直接使用 brew 安装
brew search corkscrew
brew install corkscrew
配置 ssh,编辑 ~/.ssh/config
文件,添加 ProxyCommand 配置
BFS 的重点在于队列,而 DFS 的重点在于递归。
namespace A {
export interface Node {
value: number,
export function bubbleSort<T>(list: Array<T>, compare: (a: T, b: T) => number) { | |
for(let i = 0, len = list.length; i < len - 1; i++) { | |
for (let j = 0; j < len - 1 - i; j ++) { | |
const a = list[j]; | |
const b = list[j + 1]; | |
if (compare(a, b) > 0) { | |
list[j] = b; | |
list[j + 1] = a; | |
} | |
} |
export class BitReader { | |
private offset: number = 0; | |
private bitOffset: number = 0; | |
private uint8Array: Uint8Array; | |
constructor(buffer: ArrayBuffer) { | |
this.uint8Array = new Uint8Array(buffer); | |
} | |
public read(length: number): number { |
-- 数据库大小 | |
select pg_size_pretty(pg_database_size(current_database())); | |
-- 只计算table size | |
select schemaname, pg_size_pretty(sum(pg_relation_size(schemaname || '.' || tablename))) from pg_tables group by schemaname; |
[ | |
{ | |
"name": "smileys_and_people", | |
"emojis": [ | |
{ | |
"emoji": "😀", | |
"unicode": "U+1F600", | |
"shortcode": ":grinning_face:" | |
}, | |
{ |
<object data="path/to/image-00.png" type="image/png"> | |
<img src="path/to/fallback.png" /> | |
</object> | |
<!-- why not this --> | |
<img src="path/to/image-00.png" onerror="this.src = 'path/to/fallback.png'" /> | |
<!-- 1. object is a pure html solution and does not require js. --> | |
<!-- 2. if the backup image fails to load, there is a risk of an infinite loop --> | |
<!-- 3. however, the object tag has a larger overhead --> |
grammar Expr; | |
fragment ESC: '\\' .; | |
fragment DIGIT: [0-9]; | |
WS: [ \t\r\n]+ -> skip; | |
COMMA: ','; | |
EXCLUDE: '-'; | |
KEYWORLD: ~[ \t\r\n:,-]+; |