Skip to main content

All Questions

Tagged with
3 votes
1 answer
204 views

Randomly set styles with JavaScript

I have created a function which randomly sets styles using CSS selectors. Right now it returns a random item from an array. The program also works with shorthand properties (such as ...
Gibberish's user avatar
  • 109
4 votes
1 answer
220 views

Displaying Media with HTML and JavaScript

I have a personal website that I use to share videos and images with friends. Below is a media generator using JavaScript and HTML. Its main purpose is to display one image at a time at the click of a ...
user avatar
6 votes
2 answers
373 views

Random quote rotator

On my website, I created like this banner that rotates quotes from an array I made. ...
Black Jesus's user avatar
1 vote
1 answer
695 views

Random winner selector

I am looking to improve and simplify the way I code. What is the best way to represent this: ...
AKLD321's user avatar
  • 21
3 votes
2 answers
3k views

Generating random numbers and decks of cards

So I have some code here: First a simple random # generator and a array-choosing function: ...
Malachi Wadas's user avatar
3 votes
1 answer
278 views

Retrieve random element from array not contained in second array

I have a function, getUnusedName that returns a random name, but first checks if it's already used by any object within a second array. Observing how many times ...
rmorrin's user avatar
  • 185
4 votes
1 answer
224 views

Von Neumann extractor to remove bias from pseudorandom array

Von Neumann extraction is a technique to remove bias from a source of entropy. You extract an unbiased array of bits from a biased one by comparing pairs of consecutive bits in the array and returning ...
Thriggle's user avatar
  • 1,318