stay true to the mission
So why is Bengua raffling at the boiling point? There are two immediate reasons:
- Thank you for your continued support ð;
- A smooth one item (better one item: (â’⥒â)~);
Content creators, of course, want to be noticed at the same time as they create, and sometimes it’s frustrating to put in the effort to write an article but no one will read it.
I am afraid that I will eventually become a self-obsessed author
So everyone’s feedback and support is really the most powerful encouragement for Bengua!! āļ āļ, _, ()
I don’t have any wX groups, and most likely won’t in the future. If you want to support Anthony, please go to ð and like ð~
Or pay attention to the public account [Nuggets Anthony], which has more life writing, creation in addition to programmers;
Believe in technology and deliver value. — juejin. Cn
Output exposure input, technical insights into life, we peer. — Carmelo Anthony, Nuggets
The lottery record
In this section, we will make public the drawing records of all previous lucky draws, and will continue to update and maintain this table!
In the future, each lucky draw will be guided by the link to ð
Date ð | The prize ð | Winning worker ð | Boiling point link ð |
---|---|---|---|
2021.09.06 | 1 case (6 bags) spicy and smelly snail noodles | To the lottery | Juejin. Cn/pin / 7003205… |
2021.08.07 | 100 Cash red envelope | Your code has bugs | Juejin. Cn/pin / 6993241… |
2021.07.23 | The nuggets POTS. | Mr_Chai | Juejin. Cn/pin / 6987296… |
Please rest assured, since the lottery is on the agenda, the follow-up activities will be more and more!
If you have any ideas about the prize, please leave a comment
Stay tuned!! Keep drawing!! Just one item – one item for a prize (â’⥒â)
Lottery algorithm
In the lottery, fairness is always the first! Everyone’s equal chance of winning is the most important premise!
Just in a dig article “# card master: play” shuffling algorithm, lucky goddess smile (^_^) “research disorderly shuffling algorithm, if the public algorithm to draw, it must be: well founded, too much argument!
As regular viewers know, the lottery algorithm has always used the famous Fisher-Yates algorithm. For those who are interested in the principle, please refer to the previous article.
The following is the complete code, which can be run in the console of the active boiling point interface:
const domArr=document.getElementsByClassName("comment-list")[0].getElementsByClassName("username username") const GetLuckyBoys = function(){let luckyBoys = [] for(let I =0; i<domArr.length; I ++){luckyboys.push (domArr[I].innertext)} return array. from(new Set(luckyBoys))// const FYShuffle_lucyest = Function () {// let nums=[] for(let I =1; i<=domArr.length; i++){ nums.push(i) } const radomNums = nums.slice(0); let len = radomNums.length; while (len > 1) { let rand = Math.floor(Math.random() * len); len--; let temp = radomNums[len]; radomNums[len] = radomNums[rand]; radomNums[rand] = temp; } return radomNums[0]; } const handleLottery =function (){console.log(" contestants :",getLuckyBoys())) Console. log(" Final prize :",getLuckyBoys()[FYShuffle_lucyest()]) console.log(new Date())} setInterval(()=>{// Day lucky draw countdown let Date = new Date() console.log(' countdown, ${date.gethours ()} : ${date.getminutes ()} : ${date. GetSeconds ()} `) if (date. GetHours () = = = 17 && date. GetMinutes () = = = 0 && date. GetSeconds () = = = 0) {/ / 17 o 'clock handleLottery() } },1000)Copy the code
- The nuggets comment feature is undergoing a revamp, and Dom access may be slightly different;
@I am beautiful, this workmate, script for you ~ as needed, as needed to change ð
I wish you good luck
Bengua believes the lottery should be fair and open!!
No connotation, no malice, just:
Everyone tens of thousands of ore, in exchange for a 200 => 60 or bug, how much will be a little confused ~~
So? Should the Nuggets? ðķ ðķ ðķ ðķ ðķ ðķ
Finally, good luck with the lucky draw!!
I am Anthony Nuggets, the public account of the same name, output exposure input, technical insights into life, goodbye ~