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 Foundation | |
/* | |
https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-01.html#name-uuidv7-layout-and-bit-order | |
Binary Structure (128 bits): | |
0 1 2 3 | |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |
┌─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┐ | |
│ unix_ts_ms │ |
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
/* | |
# Step 1 | |
#+------------------------------------+------------------------------------------------------------+--------+ | |
#| Issuing network | Card prefixes | Length | | |
#+------------------------------------+------------------------------------------------------------+--------+ | |
#| American Express | 34, 37 | 15 | | |
#| Diners Club International | 36 | 14 | | |
# Step 2 (Multple lengths, overlap in rules between Visa and Visa Electron) |
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
// Create a new command-line project in Xcode by going to | |
// File -> New -> Project | |
// Under "OS X" select "Application" and "Command Line Tool" | |
// Name the product whatever you want and set the type to "Foundation" | |
// Replace the created main.m file with this file | |
#import <Foundation/Foundation.h> | |
@interface Email : NSObject |
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 UIView (FrameUtil) | |
@property (nonatomic, assign) CGPoint origin; | |
@property (nonatomic, assign) CGSize size; | |
@property (nonatomic, assign) CGFloat x, y, width, height; | |
@property (nonatomic, assign) CGFloat left, top, right, bottom; | |
@end |