sudo diskutil apfs deleteContainer disk0s3
sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3
sudo diskutil apfs resizeContainer disk0s2 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
quicksort :: (Ord a) => [a] -> [a] | |
quicksort [] = [] | |
quicksort (x : xs) = | |
let smallerSorted = quicksort (filter (<= x) xs) | |
biggerSorted = quicksort (filter (> x) xs) | |
in smallerSorted ++ [x] ++ biggerSorted |
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
{-# LANGUAGE GADTs #-} | |
module Regex.Automata ( | |
Automata (..) , -- Automata states transitions (initial state) (final states) | |
Transition (..) , -- Transitions | |
subsetConstruct , -- Subset construction | |
isEpsilon , -- Indicates epsilon edge | |
getStates , -- Get two states of an edge | |
getEdgeChar , -- Get Char of an edge | |
epsilonClosure_T , -- Get the epsilon closure of a set of state |
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
const ffi = require('ffi'); | |
const ref = require('ref'); | |
const ref_struct = require('ref-struct'); | |
const struct = require('./wrapper/struct'); | |
const sendChar = ffi.Callback('int', ['string', 'int', 'pointer'], | |
// callback: SendChar | |
// return type: int | |
// args: ['string', 'int', 'void*'] | |
(res, id, user_data) => { |
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
license: gpl-3.0 | |
height: 500 | |
scrolling: no | |
border: yes |
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
//===-------------------------------------------- | |
// File: transform.cc | |
// Usage: display a given image from a specific | |
// rgb color space and simulate the image | |
// from another color rgb space. | |
// Author: Xing GUO <[email protected]> | |
//===------------------------------------------- | |
#include <iostream> | |
#include <cmath> |
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、安装arcanist,clone源代码到安装目录somewhere/,arcanist依赖于libphutil,所以两个都要clone | |
somewhere/ git clone git://github.com/facebook/arcanist.git | |
somewhere/ git clone git://github.com/facebook/libphutil.git | |
2、配置arc,将arc加入到PATH,或在/usr/sbin里面建一个到arc的软链接 | |
export PATH=$PATH:/somewhere/arcanist/bin/ | |
或者:cd /usr/sbin; ln -sf /somewhere/arcanist/bin/arc | |
* 在系统的~/.bashrc或~/.bash_profile中加上该export语句。 | |
* 运行命令"arc help",来检测安装是否成功。 | |
3、配置arc的编辑器,不然会报错,提示EDITOR环境变量没配置 | |
arc set-config editor "vim" |
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
package main | |
import ( | |
"fmt" | |
"runtime" | |
"time" | |
"math/rand" | |
) | |
type semaphore chan int |
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
## CLK | |
#set_property IOSTANDARD LVCMOS33 [get_ports clk_50M] | |
#set_property PACKAGE_PIN U18 [get_ports clk_50M] | |
## HDMI | |
#set_property IOSTANDARD TMDS_33 [get_ports TMDS_clk_n] | |
#set_property PACKAGE_PIN N18 [get_ports TMDS_clk_p] | |
#set_property IOSTANDARD TMDS_33 [get_ports TMDS_clk_p] | |
#set_property IOSTANDARD TMDS_33 [get_ports TMDS_data_n0] | |
#set_property PACKAGE_PIN V20 [get_ports TMDS_data_p0] |
OlderNewer