This file contains hidden or 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
| By default, when extracts the Xcode.zip, | |
| macos will create tmp file in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/com.apple.AUHelperService`. | |
| Sometimes, the /private has no ehough space to hold 19GB Xcode.app. | |
| Thus we can create a soft link named `com.apple.AUHelperService` in the tmp dir. | |
| Steps: | |
| 1. BACKUP `com.apple.AUHelperService` in `/private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T/` to `com.apple.AUHelperService_BACKUP` | |
| 2. mkdir named `com.apple.AUHelperService` wherever you have enough space, | |
| 3. ln -s /your/absolute/path/com.apple.AUHelperService /private/var/folders/v2/tbmrn60d2910x3w23ys5fgs00000gn/T | |
| 4. double click the Xcode.xip |
This file contains hidden or 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
| /// Tour of Dart | |
| /// A simple Mixin example about printer. | |
| class Paper { | |
| String sizeName = 'Paper'; | |
| // bool printable = false; | |
| // Paper(this.sizeName, this.printable); | |
| /// Here we don't care whether Paper can be printed, |
This file contains hidden or 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
| " Plugin Manager | |
| call plug#begin(expand('~/.vim/plugged')) | |
| " 主题 | |
| Plug 'arcticicestudio/nord-vim' | |
| Plug 'tpope/vim-sensible' | |
| Plug 'liuchengxu/space-vim-theme' | |
| " 格式工具 | |
| Plug 'Yggdroot/indentLine' " 缩进显示 | |
| Plug 'scrooloose/nerdcommenter' " 注释工具 |
This file contains hidden or 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
| tell application "System Events" | |
| -- 前提/premiss: | |
| -- 1. 在iCloud云盘下新建Bear文件夹/Create a new folder "Bear" under the iCloud | |
| -- 脚本做的事:/What the script does: | |
| -- 1. 自动化点击/Automated click | |
This file contains hidden or 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
| # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> | |
| # Contributor: Giovanni Scafora <giovanni@archlinux.org> | |
| # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca> | |
| # Contributor: Martin Sandsmark <martin.sandsmark@kde.org> | |
| pkgname=vlc | |
| _vlcver=3.0.6 | |
| # optional fixup version including hyphen | |
| _vlcfixupver= | |
| pkgver=${_vlcver}${_vlcfixupver//-/.r} |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| // 根据先序遍历判断是否是完全二叉树,输入-1表示null | |
| struct TreeNode { | |
| int ch; | |
| struct TreeNode *left; | |
| struct TreeNode *right; | |
| }; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxn = 1e5+7; | |
| std::vector<int> g[maxn], ans; | |
| bool vis[maxn]; | |
| int indeg[maxn]; | |
| int n,m; | |
| void toposort() | |
| { | |
| queue<int> q; |
This file contains hidden or 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
| // 输出图中的所有的环 | |
| //color label :white(not visited),black(all children have been visited),gray(start visiting node) | |
| // if one edge direct to a gray node means has cycle. | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxn = 1e5+3; | |
| vector<int>g[maxn]; | |
| int vis[maxn];//0 while,1 gray, 2 black | |
| int fa[maxn]; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define pass // | |
| struct node | |
| { | |
| node *lc, *rc; | |
| int key, color,height; | |
| node(){} | |
| node(int key):key(key){} | |
| }*root; |
This file contains hidden or 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
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxn = 1e5+7; | |
| vector<int> ans, g[maxn]; | |
| bool vis[maxn]; | |
| void dfs(vector<int>p, int cur, int t) { | |
| p.push_back(cur); | |
| vis[cur] = 1; | |
| if (cur == t) { | |
| for (auto x:p) printf("%d ", x); |
NewerOlder