Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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
CLASS METHODS | |
+[AVCaptureDevice requestAccessForMediaType:completionHandler:] | |
+[AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:] | |
+[HKCategorySample categorySampleWithType:value:startDate:endDate:] | |
+[HKCategorySample categorySampleWithType:value:startDate:endDate:device:metadata:] | |
+[HKCategorySample categorySampleWithType:value:startDate:endDate:metadata:] | |
+[HKCorrelation correlationWithType:startDate:endDate:objects:] | |
+[HKCorrelation correlationWithType:startDate:endDate:objects:device:metadata:] | |
+[HKCorrelation correlationWithType:startDate:endDate:objects:metadata:] | |
+[HKQuantitySample quantitySampleWithType:quantity:startDate:endDate:] |
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
// Make initialization + configuration of mutable classes (such as views) easier. | |
@warn_unused_result | |
public func Init<Type>(value : Type, @noescape block: (object: Type) throws -> Void) rethrows -> Type | |
{ | |
try block(object: value) | |
return value | |
} | |
func example() | |
{ |
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
package com.example; | |
@JsonAdapter(JsonWrapperAdapter.class) | |
public class JsonWrapper { | |
private static final String classNameKey = "className"; | |
private static final String wrappedObjectKey = "wrappedObject"; | |
private final String className; | |
private final Object wrappedObject; |
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 pyaudio | |
import wave | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 | |
CHUNK = 1024 | |
RECORD_SECONDS = 5 | |
WAVE_OUTPUT_FILENAME = "file.wav" | |
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/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
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
/* | |
* System Versioning Preprocessor Macros | |
*/ | |
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
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/Foundation.h> | |
// convert a RFC3399 date (& time) into a NSDate object | |
// NOTE: This function ignores fractions of a second in the RFC3339 | |
// representation. | |
NSDate *getDateObject(NSString *rfc3339) | |
{ | |
// Date and Time representation in RFC3399: | |
// Pattern #1: "YYYY-MM-DDTHH:MM:SSZ" | |
// 1 |