Skip to content

Instantly share code, notes, and snippets.

View tzengyuxio's full-sized avatar

Tzeng Yuxio tzengyuxio

View GitHub Profile
@tzengyuxio
tzengyuxio / uigesturerecognizer.m
Created July 26, 2011 11:17
iOS 手勢範例
// 宣告一個 recognizer, 並加到需要偵測該手勢的 UIView 元件上
- (void)viewDidLoad {
UISwipeGestureRecognizer* recognizer;
// handleSwipeFrom 是偵測到手勢後,所要呼叫的方法
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom)];
// 不同的 Recognizer 有不同的實體變數
// 例如 SwipeGesture 可以指定方向
// 而 TapGesture 則可以指定次數
recognizer.direction = UISwipeGestureRecognizerDirectionUp
[self.view addGestureRecognizer:recognizer];
@tzengyuxio
tzengyuxio / civ5zh.nsi
Created July 25, 2011 22:48
文明五正簡漢化包安裝指令
# Auto-generated by EclipseNSIS Script Wizard
# 2011/7/20 上午 10:21:09
!define NAME "civ5zh"
!define FULLNAME "Civilization V 正簡雙漢化"
!define VERSION "1.0"
Name "${FULLNAME} ${VERSION}"
# General Symbol Definitions
@tzengyuxio
tzengyuxio / civ5zh.py
Created July 25, 2011 22:45
Civ5 簡轉繁轉碼工具
# -*- coding: utf-8 -*-
import os, sys
import shutil
dirOpencc = "D:\\Apps\\opencc\\"
dirOrigin = "E:\\Steam\\steamapps\\common\\sid meier's civilization v\\assets\\"
dirOutput = "E:\\work\\civ5zh\\Sources\\assets\\"
specialFiles = ['Gameplay\\XML\\NewText\\CIV5Credits_zh_CN.txt',