Tagged articles
15 articles
Page 1 of 1
JavaScript
JavaScript
Jul 14, 2025 · Frontend Development

Why Timestamp+Random Fails and How crypto.randomUUID() Guarantees True Uniqueness

This article explains common pitfalls of generating unique IDs with timestamps and Math.random(), shows why naive counters are unreliable in browsers, and demonstrates the robust, standards‑based solution using the built‑in crypto.randomUUID() method, which offers cryptographic security and near‑zero collision risk.

JavaScriptUnique IDcrypto
0 likes · 5 min read
Why Timestamp+Random Fails and How crypto.randomUUID() Guarantees True Uniqueness
DevOps
DevOps
Jun 12, 2024 · Backend Development

Analysis and Implementation of Various WeChat Red Packet Distribution Algorithms in PHP

This article examines four common WeChat red packet distribution algorithms—simple random, double‑mean, line‑segment division, and array_rand optimization—explaining their principles, PHP implementations, performance characteristics, and how to verify randomness, providing code samples and comparative analysis for developers.

BackendPHPalgorithm
0 likes · 13 min read
Analysis and Implementation of Various WeChat Red Packet Distribution Algorithms in PHP
Model Perspective
Model Perspective
Dec 5, 2023 · Fundamentals

Predicting the Future: How Randomness, Determinism, and Math Interact

This article examines whether the world is governed by chance or necessity, discussing quantum uncertainty, classical determinism, the dual role of knowledge, and how mathematics, probability, AI, and big‑data analytics together shape our ability to understand and forecast complex systems.

Artificial IntelligenceBig DataDeterminism
0 likes · 5 min read
Predicting the Future: How Randomness, Determinism, and Math Interact
Xianyu Technology
Xianyu Technology
Dec 15, 2022 · Fundamentals

How to Build Fair Lottery Systems Using Linear Congruential Generators

This article examines the technical foundations of lottery randomness, explains linear congruential generators and their parameter constraints, discusses implementation pitfalls such as low‑bit bias, and reviews several practical lottery algorithms—including selection, shuffle, reservoir sampling, red‑packet splitting, and probability methods—to achieve fair and scalable interactive draws.

FairnessLotteryalgorithm design
0 likes · 19 min read
How to Build Fair Lottery Systems Using Linear Congruential Generators
360 Tech Engineering
360 Tech Engineering
Dec 16, 2019 · Information Security

Understanding Random Number Generation for Lottery Programs and Cryptographic Security in JavaScript

This article explains the differences between true and pseudo‑random numbers, why JavaScript's Math.random is unsuitable for secure lottery draws, and how to use the Web Crypto API's Crypto.getRandomValues with a provided code example to achieve cryptographically strong randomness.

Crypto.getRandomValuesMath.randomalgorithm
0 likes · 8 min read
Understanding Random Number Generation for Lottery Programs and Cryptographic Security in JavaScript
MaGe Linux Operations
MaGe Linux Operations
May 7, 2019 · Fundamentals

Is Thanos’ Snap Truly Random? Exploring True vs Pseudo Random Numbers

The article uses Thanos' snap from the Avengers to examine the concept of randomness, compares true random numbers with pseudo‑random generators, explains quantum random number generators, and demonstrates how Java provides various APIs for generating random values, highlighting their strengths and limitations.

computer sciencecryptographyjava
0 likes · 11 min read
Is Thanos’ Snap Truly Random? Exploring True vs Pseudo Random Numbers
Alibaba Cloud Developer
Alibaba Cloud Developer
Sep 26, 2016 · Artificial Intelligence

Can Machine Learning Predict China’s Car License Lottery? Secrets in 13‑Digit IDs

This article investigates whether the 13‑digit user IDs used in Chinese car‑license lotteries are truly random, revealing how the ID generation, seed‑based selection, and hidden patterns—especially the influential seventh digit—affect outcomes, and demonstrates that simple linear models can achieve an AUC of around 0.8 in predicting winners, while also discussing the system’s opacity across major cities.

ID generationcar license lotterydata analysis
0 likes · 17 min read
Can Machine Learning Predict China’s Car License Lottery? Secrets in 13‑Digit IDs