Tagged articles
10 articles
Page 1 of 1
Sohu Tech Products
Sohu Tech Products
Apr 27, 2022 · Backend Development

Why Using Fixed Seeds with Java Random Prints "Hello World"

This article explains how seeding Java's Random with specific integer values generates deterministic character sequences that spell "hello world", walks through the underlying ASCII conversion, shows code examples, and discusses related Java source quirks and seed‑search techniques.

Hello WorldThreadLocalRandomcode explanation
0 likes · 10 min read
Why Using Fixed Seeds with Java Random Prints "Hello World"
Java Backend Technology
Java Backend Technology
Apr 14, 2022 · Fundamentals

Why Does a Random‑Seeded Java Method Print “Hello World”?

This article explains how using fixed seeds with Java's Random class generates deterministic pseudo‑random strings that can be crafted to output "hello world", demonstrates the underlying seed mechanics, shows how to reverse‑engineer seeds for arbitrary phrases, and discusses related quirks in the Java source code.

Hello Worldcode analysisjava
0 likes · 11 min read
Why Does a Random‑Seeded Java Method Print “Hello World”?
Laravel Tech Community
Laravel Tech Community
Feb 1, 2021 · Backend Development

PHP lcg_value() Function – Combined Linear Congruential Generator

The article explains PHP’s lcg_value() function, which generates a pseudo‑random float between 0 and 1 by combining two linear congruential generators with periods 2^31‑85 and 2^31‑249, describes its return value, provides a PHP code example, and shows a sample output.

Backendlcg_valuelinear congruential generator
0 likes · 1 min read
PHP lcg_value() Function – Combined Linear Congruential Generator
IT Xianyu
IT Xianyu
Oct 16, 2020 · Fundamentals

Java Random Class: Constructors, Methods, and Implementation Details

This article provides a comprehensive overview of Java's Random class, describing its constructor, implemented interfaces, direct subclasses, and detailed explanations of all public methods—including setSeed, next, nextBytes, nextInt, nextLong, nextBoolean, nextFloat, nextDouble, and nextGaussian—along with the underlying linear‑congruential algorithm and code examples.

AlgorithmsCore Libraryjava
0 likes · 12 min read
Java Random Class: Constructors, Methods, and Implementation Details
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
Aotu Lab
Aotu Lab
Apr 29, 2016 · Frontend Development

How to Control JavaScript Randomness: Seeded Random Numbers and V8 Implementation

This article explains how JavaScript's Math.random works, why it lacks a built‑in seed, and shows practical ways to override or seed the function—including V8's internal algorithm, simple custom implementations, and real‑world use cases for reproducible randomness in web games.

V8codewarspseudo-random
0 likes · 7 min read
How to Control JavaScript Randomness: Seeded Random Numbers and V8 Implementation
Qunar Tech Salon
Qunar Tech Salon
Apr 25, 2015 · Fundamentals

Why a Java Program Using Random with Fixed Seeds Always Prints "Hello world"

Although the program uses java.util.Random with different seed values, each execution prints the same 'Hello world' because the Random instances are initialized with fixed seeds, causing the pseudo‑random generator to produce identical sequences that map to the characters forming the phrase.

javaprogrammingpseudo-random
0 likes · 5 min read
Why a Java Program Using Random with Fixed Seeds Always Prints "Hello world"