Skip to content

Instantly share code, notes, and snippets.

View MrDML's full-sized avatar

MrDML MrDML

  • Shanghai
View GitHub Profile
@MrDML
MrDML / 唯一邀请码生成方法
Created November 27, 2020 13:45 — forked from zjnxyz/唯一邀请码生成方法
唯一邀请码生成方法,通过算法实现,唯一第三方组件来判断邀请码是否唯一!!!
/**
* 随机字符串
*/
private static final char[] CHARS = new char[] {'F', 'L', 'G', 'W', '5', 'X', 'C', '3',
'9', 'Z', 'M', '6', '7', 'Y', 'R', 'T', '2', 'H', 'S', '8', 'D', 'V', 'E', 'J', '4', 'K',
'Q', 'P', 'U', 'A', 'N', 'B'};
private final static int CHARS_LENGTH = 32;
/**
* 邀请码长度
@MrDML
MrDML / UIDevice+serialNumber.h
Created October 16, 2019 10:52 — forked from 0xced/UIDevice+serialNumber.h
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)