clone files to ~/Library/Rime
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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<data> | |
<vid>1390</vid> | |
<pid>249</pid> | |
<select_profile>0</select_profile> | |
<profile> | |
<profname>default</profname> | |
<lbutton>1</lbutton> | |
<rbutton>2</rbutton> | |
<tbutton>5</tbutton> |
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
% Prolog寫起來,真的很愉悅 | |
%事實 | |
母(毛福梅, 蔣經國). | |
母(蔣方良, 蔣孝文). | |
母(蔣方良, 蔣孝武). | |
父(蔣介石, 蔣經國). | |
父(蔣經國, 蔣孝文). | |
父(蔣經國, 蔣孝武). | |
父(蔣經國, 章孝嚴). |
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
#!/usr/bin/env ruby18 | |
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor" | |
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document" | |
TextMate.save_current_document | |
TextMate::Executor.make_project_master_current_document | |
command = ["swipl", "-f", "#{ENV["TM_FILEPATH"]}", "-t", "main", "-g", "true", "--quit"] | |
TextMate::Executor.run(command) |
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
語言辨識:zh-Hant | |
斷詞:["戚戚", "堆積", "到", "淒慘", "得", "急", "憔悴", "冷冷清清", "傷心", "這", "也", "點點滴滴", "將息", "杯", "淡", "時候", "摘", "慘", "黃", "酒", "獨自", "最", "他", "有", "淒", "怎", "正", "梧桐", "難", "更", "字", "窗兒", "守", "風", "是", "如今", "兩", "乍暖還寒", "盞", "次第", "個", "尋尋覓覓", "堪", "舊時", "過", "愁", "怎生", "了得", "敵", "來", "相識", "花", "誰", "雁", "著", "黑", "卻", "晚", "黃昏", "細雨", "三", "滿地", "兼", "一", "損"] | |
詞性標記 | |
詞形還原 | |
具名實體辨識 | |
語言辨識:en | |
斷詞:["no", "I", "my", "\'ll", "wilt", "Capulet", "thou", "not", "if", "be", "and", "but", "Romeo", "love", "name", "thy", "wherefore", "longer", "O", "art", "a", "And", "father", "Deny", "Or", "sworn", "refuse"] | |
詞性標記 | |
no:Adverb | |
I:Pronoun |
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
Show hidden characters
[ | |
{ | |
"caption": " 📱", | |
"command": "shell_command", | |
"args": { | |
"command": "open -a '/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app'", | |
} | |
}, | |
{ | |
"caption": " 🏭📱", |
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
extension NSString:UIActivityItemSource { | |
public func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any { | |
return "" | |
} | |
public func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType) -> Any? { | |
let installedFB = UIApplication.shared.canOpenURL(URL(string: "fb://")!) | |
let isFB = activityType == UIActivityType.postToFacebook | |
if installedFB && isFB { | |
return nil |
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 CardList = (props) => { | |
let snapScroll, lastx, scrollingRight | |
const scrollBack = () => { | |
const len = props.cards.length | |
if (len == 0 || lastx==undefined) { | |
return | |
} | |
let index = scrollingRight? Math.ceil(lastx / cardWith) : Math.floor(lastx / cardWith) | |
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
// store: 一個app state的集合體,以object表示 | |
// 換句話說,store是由許多state組成 | |
// 先規劃 store,初始值如下 | |
// { | |
// 原料: ["咖啡"], | |
// 顏色: { | |
// 紅: 111, | |
// 綠: 78, | |
// 藍: 55, | |
// } |
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
import Foundation | |
import Cocoa | |
func text2bitmap(text: String, font: NSFont) -> [[Bool]]? { | |
let attributes = [NSAttributedStringKey.font:font] | |
let size = text.size(withAttributes: attributes) | |
let width = Int(size.width) | |
let height = Int(size.height) | |
let bytesPerRow = width |