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
function doGet(e) { | |
return makeContent(makeResponse(e, "GET")); | |
} | |
function doPost(e) { | |
return makeContent ( makeResponse(e,"POST")); | |
} | |
function checkId(id) { | |
var ss = SpreadsheetApp.openById('0ArR-uXirGVyWdFJ1WFZyclpMRzA5dmhnaVMxa29zNlE'); |
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 bpy | |
for obj in bpy.data.objects: | |
obj.name = 'replaceObjectName' | |
for mesh in bpy.data.meshes: | |
mesh.name = 'replaceMeshName' | |
for armature in bpy.data.armatures: | |
armature.name = 'replaceArmatureName' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
- (NSURL *)applicationDocumentsDirectory | |
{ | |
NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; | |
return url; | |
} |
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
- (BOOL)createDestinationInstancesForSourceInstance:(NSManagedObject *)sInstance entityMapping:(NSEntityMapping *)mapping manager:(NSMigrationManager *)manager error:(NSError **)error | |
{ | |
NSManagedObjectContext *context = [manager destinationContext]; | |
NSString *entityName [mapping destinationEntityName]; | |
NSManagedObject *dInstance = [NSEntityDescription insertNewObjectForEntityForName:entityName inManagedObjectContext:context]; | |
[dInstance setValue:@"value1" forKey:@"anyKey1"]; | |
[dInstance setValue:@"value2" forKey:@"anyKey2"]; | |
//… |
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
//レイヤーを新規作成 | |
CALayer *sublayer = [CALayer layer]; | |
sublayer.backgroundColor = [UIColor blueColor].CGColor; | |
sublayer.shadowOffset = CGSizeMake(0, 3); | |
sublayer.shadowRadius = 5.0; | |
sublayer.shadowColor = [UIColor blackColor].CGColor; | |
sublayer.shadowOpacity = 0.8; | |
sublayer.frame = CGRectMake(30, 30, 120, 150); | |
sublayer.borderColor = [UIColor blackColor].CGColor; | |
sublayer.borderWidth = 2.0; |
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 <Accelerate/Accelerate.h> | |
#import <AVFoundation/AVFoundation.h> |
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)displayContentController:(UIViewController *)content | |
{ | |
// 自身のビューコントローラ階層に追加 | |
// 自動的に子ViewControllerの`willMoveToParentViewController:`メソッドが呼ばれる | |
[self addChildViewController:content]; | |
// 子ViewControllerの`view`を自身の`view`階層に追加 | |
[self.view addSubview:content.view]; | |
// 子ViewControllerに追加が終わったことを通知する |
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 (^blk)(void) { NSLog(@"in block"); }; |
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
UIView *view1 = [[UIView alloc] initWithFrame:self.view.bounds]; | |
view1.backgroundColor = [UIColor redColor]; | |
UIView *view2 = [[UIView alloc] initWithFrame:self.view.bounds]; | |
view2.backgroundColor = [UIColor blueColor]; | |
[self.view addSubview:view1]; | |
[self.view addSubview:view2]; | |
// 追加と同時に行うとアニメーションしないので、サンプルでは処理をちょっとだけ遅延させています |