国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| // 空数组some返回false | |
| [].some(i => i); // false | |
| // 空数组every返回true | |
| [].every(i => i); // true |
| const shuffle = (nums = []) => { | |
| const randomNums = nums.slice(0); | |
| let len = randomNums.length; | |
| while (len > 1) { | |
| const rand = Math.floor(Math.random() * len); | |
| len--; | |
| const temp = randomNums[len]; | |
| randomNums[len] = randomNums[rand]; | |
| randomNums[rand] = temp; |