概率抽奖算法
/// <summary> /// 抽奖 /// </summary> /// <param name="probabilities">每个奖项的概率&
在树莓派使用apt-get
更新的时候发现一个本不应该出现的地址,并且产生了错误,显示的信息:
pi@raspberrypi:~ $ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:4 http://archive.raspbian.org/raspbian stretch InRelease [15.0 kB]
Get:5 http://220.112.193.199/files/51160000059F7E1B/mirrors.163.com/debian stretch/main armhf Packages [127 kB]
Err:5 http://220.112.193.199/files/51160000059F7E1B/mirrors.163.com/debian stretch/main armhf Packages
Hash Sum mismatch
Hashes of expected file:
- Filesize:126832 [weak]
- SHA256:c6a426389b1f3118389c70909b752d1c2eea3ac7809f507b624bc66478dff38a
- SHA1:0558935452eb0ebd2fb1d7a746a45a2d80420956 [weak]
- MD5Sum:1f5f732740e0cc670d434d9e3187403b [weak]
Hashes of received file:
- SHA256:5d57d6bb6094de8069912249919f75be74e50de1142813e6fb466551072d1eeb
- SHA1:aea06f1eb9d861e0c81cd535a142ea72b5d3364a [weak]
- MD5Sum:3daf1e1fda56c6e5320836b93e574769 [weak]
- Filesize:117191 [weak]
Last modification reported: Wed, 29 Nov 2017 19:13:43 +0000
Release file created at: Mon, 04 Dec 2017 20:54:07 +0000
Get:6 http://archive.raspbian.org/raspbian stretch/non-free Sources [125 kB]
Get:7 http://archive.raspbian.org/raspbian stretch/main Sources [9714 kB]
经过查询220.112.193.199
这个是深圳长城宽带的。
替换http://archive.raspbian.org/
后正常了。
pi@raspberrypi:/etc/apt $ sudo apt-get update
Get:1 http://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch InRelease [25.3 kB]
Get:2 http://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch/ui Sources [13.7 kB]
Get:3 http://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch/main Sources [42.9 kB]
Get:4 http://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch/main armhf Packages [127 kB]
Get:5 http://mirrors.ustc.edu.cn/archive.raspberrypi.org stretch/ui armhf Packages [27.7 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch InRelease [15.0 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main Sources [9714 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian stretch/main Sources [9714 kB]