Tagged articles
41 articles
Page 1 of 1
Python Programming Learning Circle
Python Programming Learning Circle
Dec 5, 2023 · Information Security

Generating Random Verification Codes in Python

This article explains how to use Python to randomly generate a six‑character verification code by building a list of ASCII characters, sampling six items, and concatenating them into a string, providing a simple method to enhance account security.

Verification Coderandom
0 likes · 3 min read
Generating Random Verification Codes in Python
Java Backend Technology
Java Backend Technology
Nov 17, 2023 · Information Security

Why Java’s Random Is Insecure and How SecureRandom Saves Your Data

The article explains that Java’s Random class uses a predictable linear‑congruential generator, making its output vulnerable to seed‑guessing attacks, and demonstrates how SecureRandom with strategies like SHA1PRNG, NativePRNGBlocking, and NativePRNGNonBlocking provides stronger, non‑predictable randomness suitable for security‑critical applications.

SecureRandomcryptographyjava
0 likes · 12 min read
Why Java’s Random Is Insecure and How SecureRandom Saves Your Data
Python Programming Learning Circle
Python Programming Learning Circle
Jun 9, 2022 · Fundamentals

Python Interview Questions and Answers: Memory Management, Lambda, List Operations, Exceptions, and More

This article presents a collection of common Python interview questions covering memory management mechanisms, lambda functions, tuple/list conversion, duplicate removal techniques, sorting tricks, object copying methods, exception handling, the pass statement, range usage, regex operations, match vs search differences, and random number generation, each accompanied by clear explanations and code examples.

Listexception-handlingmemory-management
0 likes · 10 min read
Python Interview Questions and Answers: Memory Management, Lambda, List Operations, Exceptions, and More
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”?
MaGe Linux Operations
MaGe Linux Operations
Mar 6, 2022 · Information Security

How Linux’s Random Number Generator Got a 8450% Speed Boost in 5.18

Under Jason Donenfeld’s leadership, Linux kernel’s random number generator was overhauled in versions 5.17 and 5.18, replacing SHA1 with BLAKE2s and shifting from per‑NUMA to per‑CPU structures, delivering up to a 131% speed increase and an astonishing 8450% boost in getrandom() performance on multi‑core systems.

BLAKE2sLinuxkernel
0 likes · 3 min read
How Linux’s Random Number Generator Got a 8450% Speed Boost in 5.18
Python Programming Learning Circle
Python Programming Learning Circle
Dec 7, 2021 · Fundamentals

Drawing a Starry Sky with Python Turtle

This tutorial demonstrates how to use Python's turtle module to randomly generate and draw a starry sky, explaining the core logic of random positions, sizes, and angles for each star and providing complete code to render the night sky effect.

Graphicsrandomstarfield
0 likes · 3 min read
Drawing a Starry Sky with Python Turtle
Python Crawling & Data Mining
Python Crawling & Data Mining
Jul 30, 2021 · Fundamentals

Master Python Functions: From Basics to Time & Random Utilities

This article introduces Python function fundamentals, shows how to define and call functions, demonstrates common time‑related functions from the time and datetime modules, and provides examples of calendar and random number utilities, all illustrated with clear code snippets and output screenshots.

Tutorialdatetimefunctions
0 likes · 6 min read
Master Python Functions: From Basics to Time & Random Utilities
Programmer DD
Programmer DD
Jul 23, 2021 · Backend Development

Why ThreadLocalRandom Beats Random in Java: Deep Dive into Unsafe and Memory

This article explores the performance drawbacks of java.util.Random in high‑concurrency scenarios, explains how ThreadLocalRandom leverages Unsafe for per‑thread seeds, examines native getLong/putLong operations, and discusses memory layout nuances such as compressed oops and potential pitfalls.

ThreadLocalRandomconcurrencyjava
0 likes · 10 min read
Why ThreadLocalRandom Beats Random in Java: Deep Dive into Unsafe and Memory
Laravel Tech Community
Laravel Tech Community
Mar 1, 2021 · Backend Development

PHP srand() – Seeding the Random Number Generator

This article explains PHP's srand() function, detailing its purpose of seeding the random number generator, optional seed parameter, lack of return value, and provides a complete example showing how to generate a seed from microtime and produce random numbers.

PHPrandomseed
0 likes · 1 min read
PHP srand() – Seeding the Random Number Generator
Laravel Tech Community
Laravel Tech Community
Feb 23, 2021 · Backend Development

PHP rand() Function – Generating Random Integers

The PHP rand() function returns a pseudo‑random integer within a given range, defaulting to 0 through getrandmax() when no parameters are supplied, and includes details on its parameters, return value, and usage examples.

BackendPHPfunction
0 likes · 2 min read
PHP rand() Function – Generating Random Integers
Laravel Tech Community
Laravel Tech Community
Dec 29, 2020 · Backend Development

PHP shuffle() Function – Randomly Shuffle an Array

This article explains the PHP shuffle() function, describing its purpose of randomly reordering array elements, the required array parameter, the boolean return value, and provides a complete example with sample output to illustrate its usage.

ArrayBackendPHP
0 likes · 2 min read
PHP shuffle() Function – Randomly Shuffle an Array
Programmer DD
Programmer DD
Dec 18, 2020 · Backend Development

Master Java Random Generators: Math.random, Random, ThreadLocalRandom & SecureRandom

This article explains how Java's random number utilities—Math.random, java.util.Random, ThreadLocalRandom, and SecureRandom—work, covering their algorithms, thread‑safety, usage examples, code snippets, and when to prefer cryptographically secure generators for security‑critical applications.

Math.randomRandom Number GenerationSecureRandom
0 likes · 10 min read
Master Java Random Generators: Math.random, Random, ThreadLocalRandom & SecureRandom
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
ITPUB
ITPUB
Jul 31, 2020 · Backend Development

What Java Developers Can Learn from Top StackOverflow Questions: Branch Prediction, Security, Exceptions, and More

This article reviews several of the most popular Java questions on StackOverflow, explaining branch prediction for sorted arrays, why char[] is safer than String for passwords, handling NullPointerException, deterministic random strings, historic timezone quirks, creating an uncatchable exception, and the differences between HashMap, TreeMap and LinkedHashMap, highlighting practical lessons for developers.

Exception HandlingHashMapStackOverflow
0 likes · 10 min read
What Java Developers Can Learn from Top StackOverflow Questions: Branch Prediction, Security, Exceptions, and More
Programmer DD
Programmer DD
Oct 8, 2019 · Backend Development

Why Java’s Random Can Fail You: Secure and Thread‑Safe Alternatives Explained

This article examines how Java's built‑in Random class works, its predictability and thread‑contention issues, and why SecureRandom and ThreadLocalRandom are essential for security‑critical or high‑concurrency scenarios, helping developers avoid common pitfalls when generating random numbers.

SecureRandomThreadLocalRandomjava
0 likes · 5 min read
Why Java’s Random Can Fail You: Secure and Thread‑Safe Alternatives Explained
Architecture Digest
Architecture Digest
Apr 17, 2017 · Backend Development

Java Load Balancing Algorithms: Round Robin, Random, Source‑IP Hash, Weighted Round Robin, Weighted Random, and Least Connections

This article explains the concept of load balancing and provides Java implementations of several common algorithms—including Round Robin, Random, Source‑IP Hash, Weighted Round Robin, Weighted Random, and a discussion of Least Connections—highlighting their principles, advantages, drawbacks, and concurrency considerations.

BackendHashRound Robin
0 likes · 14 min read
Java Load Balancing Algorithms: Round Robin, Random, Source‑IP Hash, Weighted Round Robin, Weighted Random, and Least Connections
ITPUB
ITPUB
Nov 2, 2016 · Operations

10 Creative Linux Commands to Generate Secure Random Passwords

This guide presents ten distinct Linux command‑line techniques—including SHA‑based hashing, OpenSSL, /dev/urandom filtering, dd, and custom Bash functions—to quickly produce strong, random passwords of configurable length, each illustrated with sample output.

BashLinuxpassword
0 likes · 5 min read
10 Creative Linux Commands to Generate Secure Random Passwords
ITPUB
ITPUB
Oct 23, 2016 · Information Security

10 Clever Linux Commands to Generate Strong Random Passwords

This guide walks through ten distinct Linux command‑line techniques—including date hashing, /dev/urandom filtering, OpenSSL, tr, strings, dd, and custom shell functions—to quickly produce secure, random passwords of configurable length for any environment.

passwordrandomsecurity
0 likes · 6 min read
10 Clever Linux Commands to Generate Strong Random Passwords
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"
MaGe Linux Operations
MaGe Linux Operations
Jul 7, 2014 · Operations

10 Powerful Linux Commands to Generate Random Passwords

This article presents ten tested Linux command‑line techniques for generating random passwords, each easily adjustable for length and suitable for use on Linux, Cygwin‑enabled Windows, and even macOS, offering practical options for sysadmins and developers.

command-linepasswordrandom
0 likes · 5 min read
10 Powerful Linux Commands to Generate Random Passwords