奇舞团有个传统,每年年会现场由月影现场写一个抽奖程序,所有人一起review代码,以确保抽奖程序算法没有问题,然后组织抽奖。
这个项目是奇舞团历年抽奖程序实现的开源版本。
由于2017年之前的代码找不到了(囧),所以现在只有两个版本,但是2019年和2020年的玩法已经想好了,敬请期待,嘿嘿嘿~
奇舞团历年年会现场抽奖程序
License: MIT License
源码app.js第79行
const subDuration = durations.map(d => d * factor * random(9, 11) / 10);
应该是
const subDuration = durations.map(d => d * factor * random(9, 2) / 10);
function random(m, n) {
return m + Math.random() * n
}
这样才能保证误差在-0.1 - 0.1之间
坐等2021
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.