This file contains hidden or 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> | |
| typedef void(^tapAction)(UITapGestureRecognizer *tap); | |
| @interface BlockTapView : UIView | |
| @property (copy) tapAction blockTapAction; | |
| - (instancetype)initWithFrame:(CGRect)frame andAction:(tapAction)action; |
This file contains hidden or 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
| // MARK: - Manager | |
| class SaveManager { | |
| // MARK: Singleton | |
| private static let instance = SaveManager() | |
| class func sharedInstance () -> SaveManager { |
This file contains hidden or 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 | |
| enum KVOManagerNotificationType: String { | |
| case StickerBought = "com.mojilala.Stickers.Keyboard.StickerBought" | |
| } | |
| class KVOManager: NSObject { | |
| static let sharedManager = KVOManager() | |
| func addObserver( |
This file contains hidden or 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
| for f in *.png; do mv "$f" "${f/ReplaceThisText/WithThisText}"; done |
This file contains hidden or 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
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| import SpriteKit | |
| import GameplayKit | |
| enum NoiseTileType: CustomStringConvertible { | |
| case ocean | |
| case grass | |
| case mountain |
This file contains hidden or 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 | |
| // swift port of stackoverflow answer | |
| // http://stackoverflow.com/a/31301238/2048130 | |
| extension CGFloat { | |
| /** Degrees to Radian **/ | |
| var degrees: CGFloat { | |
| return self * (180.0 / .pi) | |
| } |
This file contains hidden or 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
| public struct NSRectCorner: OptionSet { | |
| public let rawValue: UInt | |
| public static let none = NSRectCorner(rawValue: 0) | |
| public static let topLeft = NSRectCorner(rawValue: 1 << 0) | |
| public static let topRight = NSRectCorner(rawValue: 1 << 1) | |
| public static let bottomLeft = NSRectCorner(rawValue: 1 << 2) | |
| public static let bottomRight = NSRectCorner(rawValue: 1 << 3) | |
| public static var all: NSRectCorner { | |
| return [.topLeft, .topRight, .bottomLeft, .bottomRight] |
This file contains hidden or 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
| from __future__ import absolute_import, division, print_function | |
| import tensorflow as tf | |
| import tflearn | |
| import os | |
| os.environ['TF_CPP_MIN_LOG_LEVEL']='2' | |
| # Logical NOT operator | |
| X = [[0.], [1.]] |