当前位置:网站首页>Generate random password / verification code
Generate random password / verification code
2022-07-06 16:14:00 【Dream height 1.8 meters】
// len, Random length
const randomAuthorizeCode = (len) => {
// seed, Random range
var seed = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
let r = ''
// random Random selection
for (let i = 0; i < len; i++) {
let t = Math.round(Math.random() * (seed.length - 1));
r += seed[t];
}
return r;
}
边栏推荐
- Ball Dropping
- Penetration test (3) -- Metasploit framework (MSF)
- 1323. Maximum number of 6 and 9
- [exercise-5] (UVA 839) not so mobile (balance)
- Codeforces Round #797 (Div. 3)无F
- MySQL import database error [err] 1273 - unknown collation: 'utf8mb4_ 0900_ ai_ ci’
- AcWing:第56场周赛
- 双向链表—全部操作
- 【练习-4】(Uva 11988)Broken Keyboard(破损的键盘) ==(链表)
- 渗透测试 ( 2 ) --- 渗透测试系统、靶机、GoogleHacking、kali工具
猜你喜欢

Openwrt build Hello ipk

969. Pancake sorting
![[teacher Gao UML software modeling foundation] collection of exercises and answers for level 20 cloud class](/img/57/bc6eda91f7263acda38b9ee8732318.png)
[teacher Gao UML software modeling foundation] collection of exercises and answers for level 20 cloud class

Codeforces Round #802(Div. 2)A~D

【练习-4】(Uva 11988)Broken Keyboard(破损的键盘) ==(链表)

Ball Dropping

渗透测试 ( 2 ) --- 渗透测试系统、靶机、GoogleHacking、kali工具

PySide6 信号、槽

Some problems encountered in installing pytorch in windows11 CONDA
![[exercise-7] crossover answers](/img/66/3dcba2e70a4cd899fbd78ce4d5bea2.png)
[exercise-7] crossover answers
随机推荐
HDU - 6024 building shops (girls' competition)
Codeforces - 1526C1&&C2 - Potions
Understand what is a programming language in a popular way
Share an example of running dash application in raspberry pie.
Auto. Getting started with JS
(POJ - 3579) median (two points)
Openwrt build Hello ipk
QT有关QCobobox控件的样式设置(圆角、下拉框,向上展开、可编辑、内部布局等)
QT实现窗口置顶、置顶状态切换、多窗口置顶优先关系
Radar equipment (greedy)
PySide6 信号、槽
Codeforces Round #801 (Div. 2)A~C
Frida hook so layer, protobuf data analysis
力扣:第81场双周赛
MySQL grants the user the operation permission of the specified content
[exercise -11] 4 values why sum is 0 (and 4 values of 0)
Information security - threat detection engine - common rule engine base performance comparison
Data storage in memory & loading into memory to make the program run
日期加1天
QT实现圆角窗口