| 更新: | 2024-10-08 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
| import UIKit | |
| import Security | |
| let serviceIdentifier = "com.company" | |
| let accessGroup = "com.company.app" | |
| let kSecClassValue = kSecClass as NSString | |
| let kSecAttrAccountValue = kSecAttrAccount as NSString | |
| let kSecValueDataValue = kSecValueData as NSString | |
| let kSecClassGenericPasswordValue = kSecClassGenericPassword as NSString |
| 更新: | 2024-10-08 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
概要
This is a Japanese translation from the original Gist in English. 原文:You're Missing the Point of Promises by Domenic Denicola
====== この記事は私のブログでも掲載しています。また、記事中で Promises/A に言及している箇所がありますが、この記事が書かれた当時は Promises/A+の仕様がまだ存在しなかったので、少し古く感じられるかもしれません。
| <html> | |
| <body> | |
| <script src="./processing.min.js"></script> | |
| <canvas datasrc="./mondorian.pjs"></canvas> | |
| </body> | |
| </html> |
| // self.view.layerに 画像レイヤを追加するメソッド | |
| - (void)addMetorite:(NSTimer*)timer | |
| { | |
| CALayer *layer = [CALayer layer]; | |
| [layer setContents:(__bridge id)[UIImage imageNamed:@"american-flag.png"].CGImage]; | |
| [layer setContentsScale:[UIScreen mainScreen].scale]; | |
| [layer setBounds:CGRectMake(0, 0, 50, 50)]; | |
| CGRect viewBounds = CGRectInset(self.view.frame, 50, 50); | |
| [layer setPosition:CGPointMake(arc4random_uniform(viewBounds.size.width), arc4random_uniform(viewBounds.size.height))]; |
| NSTimeInterval duration = 3.0; | |
| SEL selector = @selector(_setContentOffsetAnimationDuration:); | |
| NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[scrollView methodSignatureForSelector:selector]]; | |
| [invocation setSelector:selector]; | |
| [invocation setTarget:scrollView]; | |
| [invocation setArgument:&duration atIndex:2]; | |
| [invocation invoke]; | |
| [scrollView setContentOffset:contentOffset animated:YES] |
| #!/bin/sh | |
| # usage: push-gh-pages DIRECTORY # DIRECTORY is where GitHub pages contents are in (eg. build) | |
| # LICENSE: Public Domain | |
| set -e | |
| remote=$(git config remote.origin.url) | |
| described_rev=$(git rev-parse HEAD | git name-rev --stdin) |
| #import <UIKit/UIKit.h> | |
| #import "AppDelegate.h" | |
| int main(int argc, char * argv[]) | |
| { | |
| @autoreleasepool { | |
| [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"UIDisableLegacyTextView"]; | |
| return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); |
| add_action('wp_loaded','webendev_register_nav_menu_class'); | |
| /** | |
| * New walker class to extend Walker_Nav_Menu | |
| * Dynamically adds child categories to menu | |
| * | |
| */ | |
| function webendev_register_nav_menu_class(){ | |
| class Submenu_Walker_Nav_Menu extends Walker_Nav_Menu { |