Is there any code highlighting mode that only does // and /* */ comments, as well as potentially numbers and single/double quote strings? I've been using lang-default for a while but it mangles let-before.
Ok—jig's up—this one's only related to smash in name, but it'll give you something to burn your time with while you wait 'til December 7th
Given a color string s of form #rgb(in hex, so #000000 to #ffffff, dont worry about the three digit ones: #123) you must average the rgb values, and turn it ...
Given the list of the number like 5,2,3,1,4 find the pair of three which have to agree this two condition Ri and Rj with Rk if the Both are not lesser or greater than Ri and Rj and i < k < j <= N. We just need the count.
I need the solution with least time space complexity
The solution of the g...
Definite Integral of one continue function
It is give as input one continue function and one interval [a,b], the request is find and return the definite integral of that function in [a,b] or return one not a number value if it fail the computation.
The value has to be exact as used programming ...
I have a list with my elements and all is ok if needed element is right after my checkbox with function. But with more tags It doesn't work. If I try var content = document.getElementsByClassName("content"); - it doesn't work either, because I also have a list of "content".
Can I jump to the nee...
Sandbox
The major scale (or Ionian scale) is one of the most commonly used musical scales, especially in Western music. It is one of the diatonic scales. Like many musical scales, it is made up of seven notes: the eighth duplicates the first at double its frequency so that it is called a higher ...
This can be applied to standard Python 2 at 37 bytes, making it the shortest answer yet: lambda x:x+range(*x+[-cmp(*x)|1])[1:]. Nice solution — Jonas Ausevicius3 mins ago
CMC: Given a list of names and a list of values (all strings, if you so desire), generate the corresponding object or its object notation. E.g.: ["greeting","name"]["Hello","World"] → {"greeting":"Hello","name":"World"}
Recognize the hardest context-free language
code-golf decision-problem string grammars
A context-free language is a class of strings that can be recognized by a pushdown automaton, or equivalently produced by a BNF grammar.
In her 1973 paper, Sheila Greibach showed that there exists in some s...
"If the subroutine's prototype is ($$) , the elements to be compared are passed by reference in @_ , as for a normal subroutine. This is slower than unprototyped subroutines, where the elements to be compared are passed into the subroutine as the package global variables $a and $b."
The users who voted to close this question Fastest algorithm to output array containing all integers in range excluding duplicate digits have left no clarification as to what is not clear to them at the question.
Kindly explain why it is not impossible to read the minds of users who voted to clo...
for a given array A of length n, with integers in the range 1..s , let f(A) be the sums of all the (contiguously indexed) subarrays of A. For a given s what is the largest n so that there exists a sequence of length n with distinct subarray sums?
For a given array A of length n, with integers in the range 1..s , let f(A) be the sums of all the (contiguously indexed) subarrays of A. For a given s find the largest n so that there exists a sequence of length n where all the sums in f(A) are distinct?
Consider an array A of length n. The array contains only integers in the range 1 to s. For example take s = 6, n = 5 and A = (2, 5, 6, 3, 1). Let us define g(A) as the collection of sums of all the non-empty contiguous subarrays of A. In this case g(A) = [2,5,6,3,1,7,11,9,4,13,14,10,16,15,17]. T...