https://github.com/allending/Kiwi/wiki
- 全てオブジェクトである必要がある。
- intなどはtheValue()でラップする必要がある。
- should receiveはテストするメソッド実行前に書いておく必要がある。
- should equalなどの実行結果の確認はテストするメソッド実行後に書いておく必要がある。
// Processing realtime FFT analysis | |
import processing.sound.*; | |
AudioIn input; | |
FFT fft; | |
int bands=512; | |
float[] spectrum = new float[bands]; | |
public void setup() { |
#import "YMNCoreTextView.h" | |
#import <CoreText/CoreText.h> | |
#import <QuartzCore/QuartzCore.h> | |
@interface YMNCoreTextView() | |
@property (nonatomic, strong) NSMutableAttributedString *attributedString; | |
@property (nonatomic, assign) CTFrameRef drawingFrame; | |
@property (nonatomic, assign) NSRange linkableWordRange; |
[UIView animateWithDuration:0.3 animations:^() { | |
self.commentContentLabel.alpha = (editing)? 0.0 : 1.0; | |
}]; | |
//////////////// | |
[UIView beginAnimations:nil context:nil]; | |
[UIView setAnimationDuration:1.0]; | |
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.commentContentLabel cache:YES]; | |
https://github.com/allending/Kiwi/wiki
- (void)fetchWithRequest:(NSFetchRequest *)request | |
completion:(void(^)(NSArray *results, NSError *error))handler | |
{ | |
[request setResultType:NSManagedObjectIDResultType]; | |
void (^executeHandler)(NSArray *, NSError *) = ^(NSArray *results, NSError *error){ | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
if (handler) handler(results, error); | |
}); | |
}; | |
[self.backgroundContext performBlock:^{ |
#import "YMNViewController.h" | |
NSString *const Text = @"The iOS Developer Program provides a complete and integrated process for developing and distributing iOS apps on the App Store. Learn more"; | |
NSString *const LinkText = @"Learn more"; | |
@interface YMNViewController () | |
@property (nonatomic, strong) UITextView *textView; | |
@property (nonatomic, strong) UITapGestureRecognizer *tapGesture; |
// | |
// GeoUtils.swift | |
// ZKit | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2016 Electricwoods LLC, Kaz Yoshikawa. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal |
#!/usr/bin/env python | |
import urllib | |
import urlparse | |
import oauth2 as oauth | |