当前位置:网站首页>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 .
边栏推荐
- Simplefoc parameter adjustment 2- speed and position control
- [experience] relevant configuration of remote connection to intranet server through springboard machine
- CentOS deploy PostgreSQL 13
- Amaze UI icon query
- Process and concept of process
- C language problems
- How to draw an excellent architecture diagram
- Unity beginner 4 - frame animation and protagonist attack (2D)
- Go, how to become a gopher, and find work related to go language in 7 days, Part 1
- 【学术相关】为什么很多国内学者的AI的论文复现不了?
猜你喜欢

Eps32+platform+arduino running lantern

Unity beginner 4 - frame animation and protagonist attack (2D)

Autojs微信研究:微信自动发送信息机器人最终成品(有效果演示)

Why don't you like it? It's easy to send email in cicd

The software package is set to - > Yum source
![[lecture notes] how to do in-depth learning in poor data?](/img/7d/5767c078600bd88b7d2146069f4f40.jpg)
[lecture notes] how to do in-depth learning in poor data?
![[cryoelectron microscope | paper reading] interpretation of sub fault average m software: multi particle cryo EM refining with M](/img/5e/69987afcd1e50ba37bc49441dd3a50.png)
[cryoelectron microscope | paper reading] interpretation of sub fault average m software: multi particle cryo EM refining with M

@Use of jsonserialize annotation

STM32 detection signal frequency

An Optimal Buffer Management Scheme with Dynamic Thresholds论文总结
随机推荐
Jianmu continuous integration platform v2.5.2 release
Use the cloud code to crack the problem of authentication code encountered during login
Process and concept of process
网络安全之安全基线
The computer system has no standard tcp/ip port processing operations
[academic related] why can't many domestic scholars' AI papers be reproduced?
Useful websites
Tcp/ip five layer reference model and corresponding typical devices and IPv6
Unicode private use areas
Limitations of push down analysis
Character shader exercise
Alibaba political commissar system - Chapter 1: political commissars are built on companies
Beautiful girls
[beauty of software engineering - column notes] 27 | what is the core competitiveness of software engineers? (top)
Pytorch's skill record
[beauty of software engineering - column notes] 29 | automated testing: how to kill bugs in the cradle?
Alibaba political commissar system - Chapter 4: political commissars are built on companies
In an SQL file, a test table and data are defined above, and you can select* from the test table below
Mqtt server setup and mqtt.fx testing
[memo] summary of the reasons why SSH failed? Remember to come next time.