How do I calculate what level of precise manufacturing tolerances are required for a 2 meter diameter spherical faraday cage to be considered as null void and zero EMF ?
Based on my SO question, but more specifically:
Given a text where paragraphs end with an empty line (or $ at the very end), match the up to twenty last characters of a paragraph excluding the \r or $ but no more than three complete "words" including the "separators" in between and the punctuati...
@MartinBüttner I love the fact that the meta design isn't just a greyscale version of main - the little subtle differences in the picture, and the O of Worldbuilding being wireframe instead of just black and white
Yes this challenge is far from finished - but it was suggested in the comments that it isn't worth working on because the only speed increases will be trivial leaving no room for interesting approaches
So I wanted to hear people's thoughts on that before suggesting any tidying up of the wording
I want to know if the comments on the post are fair
Chat mini-challenge: if I have a fair coin, I would give me head with a 0.5 chance and tail with a 0.5 chance; now, write a program that returns head with a p chance, and tail with a (1-p) chance, where p is a random number between 0 and 1 generated on runtime
Incremental games, also called idle games, clicker games or clicking games, are video games whose gameplay consists of the player performing simple actions (such as clicking on the screen) repeatedly to gain currency. This can be used to obtain items or abilities that increase the rate at which currency accrues.
A common theme is to give the player sources of time-based income displayed as "buildings", such as factories or farms. Some incremental games require players to collect multiple currencies to progress through the game. In some games, even the clicking becomes unnecessary after a time,...
So given for example a challenge with rather specific input and varying output (i.e. image-processing challenges) is it considered "fair play" to copy input processing logic from other answers? (for example logic to load an image to memory).
Well, it could be faster anyway. I've played around with rapid-word-flicker-things (I'm sure there's a name for it...), and you can go really fast and still read it.
I'm not sure what it does to comprehension levels, but for something like this it wouldn't really matter.
I just had a brilliant idea. I can wear headphones during "don't interrupt me" time slots at work, and anyone that wants to interrupt me will have to actually walk to my desk!
I can't wrap my head around the algorithm for making the following:
I have an array for all possible characters: array("a", "b", "c",...."z", " ", "!"...) you get the idea.
Now I would like to generate all possible compinations of these characters with the length of x.
so for example the array...
for those who don't follow Scott Aaronson's blog, our own awesome Peter Taylor is making an awesome code golf contribution currently. See scottaaronson.com/blog/?p=2741#comments
3
Thus proving finally that PPCG users >> Professors at MIT :)
I almost said something too but I'm feeling non-confrontational so I will do the work for you: Given a number X, return two numbers (Y, Z) such that Y**2 * Z = X, and Z is square-free
@orlp It's standard terminology if you are heavily involved in mathematics. If you aren't heavily involved in Mathematics, then "square free" looks like ambiguous English.
@El'endiaStarman I meant 1 as the second number - I was just being a jerk, but basically without the example, there wasn't much of a spec except that the second number is squarefree (the "return (a,b) such that a**2 * b = n" phrasing is better)
>>> def f(n):
... a, b = 1, 1
... for p, e in factorization(n).items():
... a *= p ** ((e & ~1) >> 1)
... b *= p ** (e & 1)
... return a, b
>>> f(108)
(6, 3)
I'm about to make someone really mad by rejecting a code review where 100% of the code was copied and pasted from another project instead of being extracted into a third project for reuse.
You can use superscript three to nine (³⁴⁵⁶⁷⁸⁹) to golf some usually used
values, but this depends on the amount of command line arguments, and in case of links, on the arguments of the links.
³ returns 100, and works only if there's no input.
⁴ returns 16, and works only if there's at most on...
My Jelly tip on superscript values, improved with new superscript eight and nine!