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
// 宣告一個 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]; |
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
- (void)viewDidLoad { | |
// 單擊的 Recognizer | |
UITapGestureRecognizer* singleRecognizer; | |
singleRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTapFrom)]; | |
singleTapRecognizer.numberOfTapsRequired = 1; // 單擊 | |
[self.view addGestureRecognizer:singleRecognizer]; | |
// 雙擊的 Recognizer | |
UITapGestureRecognizer* double; | |
doubleRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTapFrom)]; |
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 urllib | |
# http://mh.99770.cc/manhua/5264/ | |
# http://mh.99770.cc/manhua/5264/42671.htm?s=3 (Book 1) | |
sServer="http://61.164.109.141:99/dm03/" | |
sFiles="/ok-comic00/j/jjs/vol_01/99770_001DD.jpg|/ok-comic00/j/jjs/vol_01/99770_002en.jpg|/ok-comic00/j/jjs/vol_01/99770_003zb.jpg|/ok-comic00/j/jjs/vol_01/99770_004va.jpg|/ok-comic00/j/jjs/vol_01/99770_005yQ.jpg|/ok-comic00/j/jjs/vol_01/99770_006cQ.jpg|/ok-comic00/j/jjs/vol_01/99770_007OI.jpg|/ok-comic00/j/jjs/vol_01/99770_008bY.jpg|/ok-comic00/j/jjs/vol_01/99770_009ue.jpg|/ok-comic00/j/jjs/vol_01/99770_010pv.jpg|/ok-comic00/j/jjs/vol_01/99770_011rC.jpg|/ok-comic00/j/jjs/vol_01/99770_012TU.jpg|/ok-comic00/j/jjs/vol_01/99770_013qr.jpg|/ok-comic00/j/jjs/vol_01/99770_014BY.jpg|/ok-comic00/j/jjs/vol_01/99770_015fI.jpg|/ok-comic00/j/jjs/vol_01/99770_016YE.jpg|/ok-comic00/j/jjs/vol_01/99770_017Le.jpg|/ok-comic00/j/jjs/vol_01/99770_018mb.jpg|/ok-comic00/j/jjs/vol_01/99770_019HC.jpg|/ok-comic00/j/jjs/vol_01/99770_020DB.jpg|/ok-comic00/j/jjs/vol_01/99770_021te.jpg|/ok-comic |
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 urllib | |
sFiles="iieye0001-23513.JPG|iieye0002-18220.JPG|iieye0003-10817.JPG|iieye0004-75058.JPG|iieye0005-80467.JPG|iieye0006-26063.JPG|iieye0007-94037.JPG|iieye0008-12816.JPG|iieye0009-14654.JPG|iieye0010-17029.JPG|iieye0011-20600.JPG|iieye0012-96905.JPG|iieye0013-91006.JPG|iieye0014-55435.JPG|iieye0015-10618.JPG|iieye0016-16298.JPG|iieye0017-19149.JPG|iieye0018-16392.JPG|iieye0019-20006.JPG|iieye0020-19246.JPG|iieye0021-79939.JPG|iieye0022-11035.JPG|iieye0023-13656.JPG|iieye0024-20087.JPG|iieye0025-91993.JPG|iieye0026-17052.JPG|iieye0027-14807.JPG|iieye0028-34208.JPG|iieye0029-19081.JPG|iieye0030-80558.JPG|iieye0031-76807.JPG|iieye0032-93202.JPG|iieye0033-14767.JPG|iieye0034-34961.JPG|iieye0035-14144.JPG|iieye0036-53597.JPG|iieye0037-41496.JPG|iieye0038-61202.JPG|iieye0039-95867.JPG|iieye0040-12868.JPG|iieye0041-20183.JPG|iieye0042-45299.JPG|iieye0043-92110.JPG|iieye0044-14851.JPG|iieye0045-41312.JPG|iieye0046-88416.JPG|iieye0047-70173.JPG|iieye0048-18556.JPG|iieye0049-30552.JPG|iieye0050-59343.JPG|i |
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/python | |
import sys | |
import random | |
def misspell(s): | |
# word and punctation | |
(w, p) = (s, '') if s[-1] not in [',', '.', ';', ':'] else (s[:-1], s[-1]) | |
if len(w) <= 3: | |
return s |
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
#!/bin/bash | |
# start year and end year | |
SYEAR=2005 | |
EYEAR=`date "+%Y"` | |
POSTPATH=~/github/octopress/source/_posts/ | |
echo | |
echo "YEAR File # Word Count" |
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 python3 | |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
from urllib.parse import urljoin | |
import io | |
import json | |
homepage = "https://zh.wikipedia.org/zh-tw/Category:%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E5%90%84%E7%9C%81%E7%BA%A7%E8%A1%8C%E6%94%BF%E5%8C%BA%E8%A1%8C%E6%94%BF%E5%8C%BA%E5%88%92%E6%A8%A1%E6%9D%BF" # noqa |
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
gless | |
wace us a glause, | |
Than ouch the camfal dean! | |
CORIOLANUS: | |
Whesale with-let Marcer terpty body of comk | |
Tose thus sear it thy and house hithy | |
meirs with your rricmord, all resw. | |
Gor expoace they kincensuling but broskry Romeighcciod, | |
One: loxte. |
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
Rowhild; | |
CORIOLANUS: | |
But I think'st true. | |
Second Citizen: | |
By the lord! | |
'Since, bay them as forth from me. | |
CLARENCE: |
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
爭清塗愁時月修聲,自前干中。 | |
衰丘步二 結況 | |
遮生月醉田,李音不忽君。歸朝不前遠,涼梅遠不留。 | |
庭答德二 項物 長能 |