.: <seq/num> <int> All substrings of A of length B.
.: <seq/num> <float> All substrings of A of length floor(len(A) * B)
.: <seq/num> <none> All substrings of A of positive length.
I want to get this sequence: [[0], [1], [2], [3], [4], [0, 1], [1, 2], [2, 3], [3, 4], [0, 1, 2], [1, 2, 3], [2, 3, 4], [0, 1, 2, 3], [1, 2, 3, 4], [0, 1, 2, 3, 4]], for an input of 5, I get it with .:Q
As the title says, I'm working on a PPCG remake outside of SE.
https://github.com/PPCGRemake/PPCGRemake
This is currently in the planning stage. I'm planning to build this with Ruby on Rails. If anyone wants to help with this project or otherwise support it, please comment or add a GH issue, I'...
@LeakyNun bit late but 1{[:,[:+/ .*/I.@|.@#:_&(]+/ .*~)_2]\#:@7: for log2(n) Fibonacci numbers using the Fibonacci matrix [[1,1],[1,0]] and exponentiation by squaring
Yeah I started with the idea of using AL€œs3 and found div by zero errors and then after I addressed that with the much longer code above found I still needed to special case the equal length case. I thought I'd try and implement a different way today, but looks like you did already. — Jonathan Allan14 mins ago
A recent challenge has been posted on the main site. A user discovered that it was copied word-to-word from an external source, and that challenge has been closed as off-topic, with this reason: "Questions without an objective primary winning criterion are off-topic, as they make it impossible to...
@DestructibleLemon so once you get the time of collision and the x,y coordinates, you can create an equation for both circles. Then you find the point of intersection of both circle equations
and that will tell you the coordinate of contact on the circle
I've already solved that in Python in the past (PE #1), and I can't submit another one: if the correct result is 233168, I have got an extremely ungolfy solution: sf|q0%T3q0%T5S999
Got the same result with a horribly ungolfy code: V^T3I|q0%N3q0%N5=+ZN;Z
@LeakyNun Why doesn't this sf>2+%T3%T5S999 give correct results?
In propositional logic and boolean algebra, De Morgan's laws are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation.
The rules can be expressed in English as:
the negation of a conjunction is the disjunction of the negations; and
the negation of a disjunction is the conjunction of the negations;
or
the complement of the union of two sets is the same as the intersection of their complements...
Title: Chicken McNugget Numbers
Description
Chicken McNugget numbers are numbers that can be expressed as a sum of 6, 9 or 20 - the initial sizes of the famous Chicken McNuggets boxes sold by McDonalds. In that sum, a number may occur more than once, so 6 + 6 = 12 is such a number too. The firs...
@LeakyNun I've been looking at your Pyth answer, because I wanted to see if my new explanation for my answer is good enough, and scrolled down and found your Pyth sumbission, which is surprisingly golfy.
I've found a number of questions that concern the Doppler effect, but none that seem to address my question.
I have a background in music. People with a musical ear can generally tell the ratio between two frequencies (as a musical interval). For anyone who's not already aware, we perceive a rat...
@EriktheOutgolfer Only just noticed these messages, sorry! Equivalent to A1ẋœs3 yeah. Splitting a run of 1s into three chunks of equal lengths, but if the input to split into 3 were [1,1] you end up with [[1],[1],[]] not [[1],[1]] as I was expecting and other things to work around. Meanwhile I've golfed the existing answer all the way down to 34 to nip at your heels :p
Background
Sometimes, people think you didn't work at your git project. But - you can prove yourself with git shortlog -n. Now, the problem is you are a programmer and programmers are lazy. So you want to write a program which shows the person who committed at most.
Rules
You may not do the fo...
thoughts on this string representation?
A000004: The zero sequence.
Monday, 16-May-1994 07:00:00 GMT
Keywords: [core] [easy] [nonn] [mult]
Author: N. J. A. Sloane
current goals are basically "easy vectorization, like jelly. Complete absence of variables, but not reliant on arity, and not stack based. Syntax similar to zalgo text, with the ascii parts resembling stuff from the mythos"
help me clean up this ugly code:
keywords = ' '.join('[{:s}]'.format(key) for key in self.info['keywords'])
return 'A{0:06d}: {1:s}\n{2:s}\nKeywords: {3:s}\nAuthor: {4:s}'.format(
self.seq_id, self.name, self.info['created'], keywords, self.info['author'])
Typical vote distribution on answers (with definitely no basis on reality):
+100: the "themed"/"joke" answer, or, less often, the one answer to a hard qeuestion. +33: the generally impressive answer, which took lots of time to produce, often aided with proof. +8 to +100: the cool-looking pile of code that vaguely resembles an insane Greek philosopher trying to communicate: `ßæ×ɲ«Hµɱs`. +4: the generic programming language answer. +1 to +2: the generic esolang language answer. +7 to +13: the fashionable new esolang answer.
I'm aware, I've written a few python minifiers/compressors in my life
I have a module somewhere that compresses python pickle files by just embedding the file zipped, and abuses the pickling machinery to just decompress and then unpickle it
The Chroma Key to Success code-golfgraphical-outputimage-processing
The RGB color value #00FF00 is a rather important one: it is used to make movies, TV shows, weather announcements, and more. It is the famous "TV green" or "green screen" color.
The Challenge
Your task is to write a program ...
The Chroma Key to Success code-golfgraphical-outputimage-processing
The RGB color value #00FF00 is a rather important one: it is used to make movies, TV shows, weather announcements, and more. It is the famous "TV green" or "green screen" color.
The Challenge
Your task is to write a program ...