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
| public class MainActivity extends Activity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| // Setup Data | |
| String[] values = new String[] { "Android", "iPhone", "WindowsMobile", | |
| "Blackberry", "WebOS", "Ubuntu", "Windows7", "Max OS X", | |
| "Linux", "OS/2", "Ubuntu", "Windows7", "Max OS X", "Linux", |
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
| // | |
| // ViewController.swift | |
| // constrainAnimation | |
| // | |
| // Created by Liyao on 2014/10/30. | |
| // Copyright (c) 2014年 swiftTaipei. All rights reserved. | |
| // | |
| import UIKit |
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
| // | |
| // LaunchController.swift | |
| // Combo | |
| // | |
| // Created by Liyao on 2014/10/27. | |
| // Copyright (c) 2014年 swiftTaipei. All rights reserved. | |
| // | |
| import UIKit | |
| import AVFoundation |
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
| var map = [[Int]]() | |
| var path = [[Int]]() | |
| var level = 3 | |
| var stack = [Int]() | |
| func nextSetp(currentStep: Int, currentIndex: Int) { | |
| let value = map[currentStep][currentIndex] |
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
| git rm --cached mylogfile.log |
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
| @interface LCTextView : UITextView | |
| @property (strong, nonatomic) NSString *placeholder; | |
| @property (strong, nonatomic) UIColor *placeholderColor; | |
| - (void)textChangeNotifiaciton:(NSNotification *)n; | |
| @end | |
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
| xcrun simctl list | grep -oh '[A-Z0-9]\{8\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{4\}-[A-Z0-9]\{12\}' | xargs -n1 xcrun simctl delete |
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
| enum LogTag: String { | |
| case APP = "[APP]" | |
| case DEBUG = "[DEBUG]" | |
| case ERROR = "[ERROR]" | |
| } | |
| fileprivate func debugLog( _ log: @autoclosure () -> Any, _ tags: [LogTag]) { | |
| #if DEBUG | |
| var tagStr = "" | |
| for tag in tags { |
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
| @interface DummyUITableViewDataSource : NSObject <UITableViewDataSource> | |
| @end | |
| @implementation DummyUITableViewDataSource | |
| - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
| { | |
| return 40; | |
| } |
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
| @interface LCTableViewTests : XCTestCase | |
| @end | |
| @implementation LCTableViewTests | |
| //驗證互動 | |
| - (void)testTableViewDataSourceNumberOfRowsInSecitonWithDummyClass | |
| { | |
| //Arrange | |
| DummyUITableViewDataSource *dataSource = [[DummyUITableViewDataSource alloc] init]; |
OlderNewer