当前位置:网站首页>Flutter dart generates a list of random numbers that are not repeated in n intervals
Flutter dart generates a list of random numbers that are not repeated in n intervals
2022-07-26 12:55:00 【Flutter Mengxin College】
List<int> resultList = [];
var rng = new Random();
int count = 0;
while (count < 6) {
// Generate 6 individual
int index = rng.nextInt(12) + 1; // 1-12 Between
if (!resultList.contains(index)) {
resultList.add(index);
count++;
}
}
resultList.sort();
print(resultList);
边栏推荐
- LCD notes (6) LCD driver framework_ Configuration pin
- Industry case | how does the index help the sustainable development of Inclusive Finance in the banking industry
- 今日睡眠质量记录75分
- Optical distance sensing chip 4530a combining ambient light, proximity sensing and infrared ranging
- 回溯——46. 全排列
- New function | intelligent open search online customized word weight model
- Shell variables and references
- Ssj-21b time relay
- If there is a declaration "int x=5, y=1;", Then the expression x < y? The result of x++: y++ is:
- V00 - do whatever you want when you are old
猜你喜欢

Various extensions of hcip-9.ospf

Panorama of volcanic engine cloud growth plan: 30 + plans come out together, and military development advantage areas

A super easy-to-use artifact apifox, throw swagger a few streets... (glory Collection Edition)

若有声明”int x=5,y=1;”,则表达式x<y?x++:y++的结果是:

2022 年要了解的新兴安全供应商

【2243】module_ param.m

Implementation of dynamic and static libraries (packaging dynamic and static libraries for others to use)

Food safety | what food can be heated in a microwave oven? You should know these potential safety hazards

Qualcomm once again "bet" on Zhongke Chuangda to challenge the full stack solution of intelligent driving software and hardware

华为年内二度招聘“天才少年”;540万Twitter账号信息泄露,卖价3万美元;谷歌解雇了相信AI有意识的工程师|极客头条...
随机推荐
Detailed explanation of redis's single login
若有声明”int x=5,y=1;”,则表达式x<y?x++:y++的结果是:
虚拟偶像代言产品出问题谁负责?且听律师分析
STM32 drives hc05 Bluetooth serial port communication module
Customize browser default right-click menu bar
Does anyone know where the retract of flinksql can be specified? Only api code settings can be seen in online materials
Today's sleep quality record 75 points
JDBC gets connections from the connection pool (Druid connection pool)
PXE原理与配置
Interview JD T5, was pressed on the ground friction, who knows what I experienced?
Code examples explain the difference between [reentrant lock] and [non reentrant lock]?
Huawei ultra fusion fusioncube solution notes
代码报错解决问题经验之二:YOLOv5中的test报错
食品安全 | 随便果可以”随便“吃吗?
Kubernetes - Introduction to PV and PVC of advanced storage
Access database cannot connect
jvm:类加载子系统干什么的?由什么组成?需要记住哪些八股文?
A super easy-to-use artifact apifox, throw swagger a few streets... (glory Collection Edition)
酷早报:7月25日Web3加密行业新闻大汇总
高通再次「押宝」中科创达,挑战智能驾驶软硬件全栈方案