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 <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
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
# -*- coding: utf-8 -*- | |
import datetime | |
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE | |
class MoniterLog(admin.ModelAdmin): | |
#dt_utc = datetime.datetime.strptime('action_time', '%Y-%m-%d %H:%M:%S') | |
#str_utc = 'action_time' | |
#dt_utc = datetime.datetime.strptime(str_utc, '%Y-%m-%d %H:%M:%S') | |
#dt_jst = dt_utc + datetime.timedelta(0,3600) | |
#str_jst = dt_jst.strftime('%Y/%m/%d %H:%M:%S') |
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
// | |
// BPPrivateWebView.h | |
// BPUI | |
// | |
// Created by akisute on 11/09/11. | |
// | |
/* | |
Copyright (c) 2011 Masashi Ono. | |
Permission is hereby granted, free of charge, to any person obtaining a copy of |
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
// | |
// AsyncSenTestingKitTests.h | |
// AsyncSenTestingKitTests | |
// | |
// Created by 小野 将司 on 12/03/17. | |
// Copyright (c) 2012年 AppBankGames Inc. All rights reserved. | |
// | |
#import <SenTestingKit/SenTestingKit.h> | |
#import "SenAsyncTestCase.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
#!/usr/bin/env ruby | |
# | |
# PostprocessBuildPlayer version 2 | |
# Tested on Ruby 1.8.7, Gem 1.3.6, and xcodeproj 0.4.1 | |
# Created by akisute (http://akisute.com) | |
# Licensed under The MIT License: http://opensource.org/licenses/mit-license.php | |
# | |
require 'rubygems' | |
# least require version, doesn't work in 0.3.X or less |
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 <UIKit/UIKit.h> | |
@interface UIWebView (Additions) | |
/*! | |
@abstract Enable/Disable the receiver from scrolling. | |
*/ | |
@property (nonatomic, assign) BOOL webViewScrollEnabled; |
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
//////////////// | |
// on iPad Air 2 | |
//////////////// | |
// Boot as portrait | |
2015-06-15 19:57:47.597 ios9[16003:229076] viewDidLoad() | |
2015-06-15 19:57:47.598 ios9[16003:229076] viewWillAppear - false | |
2015-06-15 19:57:47.601 ios9[16003:229076] traitCollectionDidChange - nil | |
2015-06-15 19:57:47.602 ios9[16003:229076] viewWillLayoutSubviews() | |
2015-06-15 19:57:47.602 ios9[16003:229076] viewDidLayoutSubviews() |
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
using UnityEngine; | |
using System.Collection.Generics; | |
using System.Linq; | |
public void MapExample() { | |
// System.Linq.Queryable.Selectメソッドがいわゆるmapに相当するメソッドになります | |
List<UnityEngine.Object> allResources = new List<UnityEngine.Object>(Resources.FindObjectsOfTypeAll(typeof(UnityEngine.Object))); | |
IEnumerable<string> allResourceNames = allResources.Select(x => x.name); | |
Debug.Log(string.Join("\n", allResourceNames.ToArray())); | |
} |
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)exitFullScreenVideo | |
{ | |
// Works in iOS, not sure in OS X | |
[self.webView stringByEvaluatingJavaScriptFromString:@"Array.prototype.forEach.call(document.getElementsByTagName('video'),function(v){v.webkitExitFullscreen();});"]; | |
// Didn't work in iOS, works in OS X | |
[self.webView stringByEvaluatingJavaScriptFromString:@"if(document.webkitFullscreenElement){document.webkitExitFullscreen();}"]; | |
} |
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
/* | |
WARNING: PRIVATE API CALLS | |
WARNING: FORCEFUL MEMORY MANAGEMENT | |
highly recommend to avoid using this code | |
*/ | |
- (void)exitFullScreenVideo:(BOOL)animated completion:(void (^)(void))completion | |
{ | |
/* | |
iOS 6~7の場合 | |
本ViewControllerの上にMPInlineVideoFullscreenViewControllerがfullscreen modalで表示されるような挙動になるので |
NewerOlder