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
//: Playground - noun: a place where people can play | |
import UIKit | |
class Hoge: Comparable, Hashable { | |
let text:String | |
init(text:String) { | |
self.text = text | |
} |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
class Hoge: NSObject, Comparable { | |
let text:String | |
init(text:String) { | |
self.text = text | |
} |
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
let asset = AVAsset(url: sourceFileURL) | |
let dict = [AVSampleRateKey:44100, AVFormatIDKey:kAudioFormatLinearPCM] as [String : Any] | |
assetReaderOutput = AVAssetReaderAudioMixOutput(audioTracks: asset.tracks, audioSettings: dict) | |
do { | |
assetReader = try AVAssetReader(asset: asset) | |
if assetReader.canAdd(assetReaderOutput) { | |
assetReader.add(assetReaderOutput) | |
assetReader.startReading() | |
} |
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
let japaneaseCalendar = Calendar(identifier: Calendar.Identifier.japanese) | |
var dateFormatter = DateFormatter() | |
dateFormatter.calendar = japaneaseCalendar | |
dateFormatter.dateFormat = "GGyy" | |
dateFormatter.locale = Locale(identifier: "ja_JP") | |
dateFormatter.string(from: Date()) |
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
let a = NSURLQueryItem(name: "a", value: "yes") | |
let b = NSURLQueryItem(name: "b", value: "no") | |
let urlComponents = NSURLComponents(string: "https://hoge.com") | |
urlComponents!.queryItems = [a, b] | |
urlComponents!.URL | |
=> "https://hoge.com?a=yes&b=no" |
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
<key>UILaunchImages</key> | |
<array> | |
<dict> | |
<key>UILaunchImageName</key> | |
<string>Default</string> | |
<key>UILaunchImageMinimumOSVersion</key> | |
<string>7.0</string> | |
<key>UILaunchImageOrientation</key> | |
<string>Portrait</string> | |
<key>UILaunchImageSize</key> |
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
- (void)drawRect:(CGRect)rect | |
{ | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextAddRect(context, CGRectMake(50, 50, 200, 250)); | |
CGContextAddRect(context, CGRectMake(60, 60, 100, 100)); | |
CGContextSetRGBFillColor(context, 0, 0, 1, 1); | |
CGContextDrawPath(context, kCGPathEOFill); | |
} |
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
[ 92%] Generating pyopencv_generated_funcs.h, pyopencv_generated_func_tab.h, pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_const_reg.h | |
Traceback (most recent call last): | |
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/gen2.py", line 896, in <module> | |
generator.gen(srcfiles, dstdir) | |
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/gen2.py", line 826, in gen | |
decls = parser.parse(hdr) | |
File "/Users/nagano/Dropbox/OpenCV/opencv/modules/python/src2/hdr_parser.py", line 733, in parse | |
linelist = list(f.readlines()) | |
File "/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/encodings/ascii.py", line 26, in decode | |
return codecs.ascii_decode(input, self.errors)[0] |
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
#import "RCViewController.h" | |
@import QuartzCore; | |
@implementation RCViewController | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
CGRect rect; |
NewerOlder