当前位置:网站首页>Random lottery turntable wechat applet project source code
Random lottery turntable wechat applet project source code
2022-07-29 08:07:00 【Chloroplasts don't forget to breathe】
Wechat applet : Chuangxiang diary
send out : Lottery turntable
Get the full source code ( Wechat developer tools are available when opened )

It can be easily modified by itself , Integrate into your own project .
function formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
function formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
}
<!--index.wxml-->
<view class="container-out">
<view class="circle" wx:for="{
{circleList}}" style="top:{
{
item.topCircle}}rpx;left:{
{
item.leftCircle}}rpx;background-color: {
{
(index%2==0)?colorCircleFirst:colorCircleSecond}};"></view>
<view class="container-in">
<view class="content-out" wx:for="{
{awardList}}" style="top:{
{
item.topAward}}rpx;left:{
{
item.leftAward}}rpx;background-color: {
{
(index==indexSelect)?colorAwardSelect:colorAwardDefault}};">
<image class="award-image" src="{
{item.imageAward}}"></image>
</view>
<view class="start-btn" bindtap="startGame" style=" background-color:{
{isRunning?'#e7930a':'#ffe400'}}">START</view>
</view>
</view>
probability , Also known as “ Probability rate ”, It reflects the probability of random events . A random event is a random event under the same conditions , Events that may or may not occur . for example , From a batch of goods with genuine and defective products , Take one at random ,“ It's authentic ” It's just a random event . Suppose a random phenomenon is n Test and observation , among A The incident occurred m Time , That is, the frequency of its occurrence is m/n. After a lot of trial and error , There is often m/n Closer and closer to a certain constant ( See Bernoulli's law of large numbers for the proof of this conclusion ). This constant is the event A Probability of occurrence , Commonly used P (A) Express .
The first person to systematically calculate probability is 16 Caldano in the th century . Recorded in his works 《Liber de Ludo Aleae》 in . The content about probability in the book is written by Gould Translated from Latin .
There's a lot of advice for gamblers in caldano's math books . These suggestions are written in short essays . However , It was in a series of letters between Pascal and Fermat that the first systematic study of probability was proposed . These communications were originally proposed by Pascal , He wants to ask Fermat for some advice about Chevvalier de Mere Questions raised .Chevvalier de Mere Is a famous writer , The dignitaries of Louis XIV's court , And a fanatical gambler . The main problems are two : The dice problem and the game bonus distribution problem .
Probability is a measure of the probability of an accidental event . If you repeat the test many times ( use X representative ), An accident ( use A representative ) Several times ( use Y representative ). With X As the denominator ,Y As molecule , Form a numerical value ( use P representative ). In many experiments ,P Relatively stable at a certain value ,P It's called A Probability of occurrence . For example, the probability of accidental events is determined through long-term observation or a large number of repeated tests , Then this probability is statistical probability or empirical probability .
The discipline that studies the internal laws governing accidental events is called probability theory . It belongs to a branch of Mathematics . Probability theory reveals the expression form of the internal law contained in accidental phenomena . therefore , probability , It plays an important role in people's understanding of natural and social phenomena . such as , Social products should be deducted before being allocated to individual consumption , How much to deduct , The proportion of accumulation in national income, etc , We need to use probability theory to determine .
边栏推荐
- Beautiful girls
- [beauty of software engineering - column notes] 26 | continuous delivery: how to release new versions to the production environment at any time?
- Arduinoide + stm32link burning debugging
- @Use of jsonserialize annotation
- [academic related] why can't many domestic scholars' AI papers be reproduced?
- Pytest set (7) - parameterization
- [cryoEM] Introduction to FSC, Fourier shell correlation
- Unity beginner 3 - enemy movement control and setting of blood loss area (2D)
- Network Security Learning chapter
- An Optimal Buffer Management Scheme with Dynamic Thresholds论文总结
猜你喜欢

Up sampling deconvolution operation
![[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging](/img/1e/9f05862288261e16a6b04508b9b292.png)
[cryoelectron microscope | paper reading] emclarity: software for high-resolution cryoelectron tomography and sub fault averaging

STM32 MDK (keil5) contents mismatch error summary

UE4 highlight official reference value
![[beauty of software engineering - column notes] 24 | technical debt: continue to make do with it, or overthrow it and start over?](/img/09/296185ae299bec898b8bbe9cfc993f.png)
[beauty of software engineering - column notes] 24 | technical debt: continue to make do with it, or overthrow it and start over?

Jianmu continuous integration platform v2.5.2 release

Day 014 二维数组练习

Arduino uno error analysis avrdude: stk500_ recv(): programmer is not responding

V-Ray 5 acescg workflow settings

Compare three clock circuit schemes of single chip microcomputer
随机推荐
Operator overloading
Actual measurement of boot and pH pins of buck circuit
Ansible (automation software)
In an SQL file, a test table and data are defined above, and you can select* from the test table below
[paper reading] tomoalign: a novel approach to correcting sample motion and 3D CTF in cryoet
20 hacker artifacts
Eps32+platform+arduino running lantern
Very practical shell and shellcheck
Day 014 二维数组练习
[cryoelectron microscope | paper reading] interpretation of sub fault average m software: multi particle cryo EM refining with M
MySQL rownum implementation
STM32 MDK (keil5) contents mismatch error summary
STM32 detection signal frequency
Redshift 2.6.41 for maya2018 watermark removal
An optimal buffer management scheme with dynamic thresholds paper summary
STM32 serial port garbled
Unity beginner 3 - enemy movement control and setting of blood loss area (2D)
[beauty of software engineering - column notes] 21 | architecture design: can ordinary programmers also implement complex systems?
[beauty of software engineering - column notes] "one question and one answer" issue 2 | 30 common software development problem-solving strategies
Pytorch's skill record