I don't need inner classes but I think it makes the code look prettier.
And maybe I'm wrong and it makes my code an unreadable mess.
But I think it's for the best that I do it in C#, since I'm working on this project with a group of other people, most of whom having no intrest in learning F#.
I'm confused. Microsoft introduced a new kind of literal (tuples) into C# 7, but you need an external package to use them. Does this mean anyone can define packages that extend C#?
@HyperNeutrino Maybe they are greatful of the removal of trash.
user165474
s/great/grate/
user165474
eergh grammar bothers me lol
user165474
So if I have my alarms at 6:00 and 6:02 and I want to change them to 6:30 and 6:32, instead of going up (or down) for both by 30 minutes, I can go down 28 minutes and up 28 minutes to save 4 units of time where each unit is about 0.05 seconds.
@ATaco Ah, sorry. I could, but that would be an additional pain if tio.run/jelly is followed by a permalink. jelly.tryitonline.net will still work though.
@Dennis I also suggest you add CSS cursor styles for the top buttons (eg. cursor: pointer;), as well as anything that can be interacted with the mouse.
Google has added this differing in hovering feedback to make a visual distinction between navigational elements and action elements in the UI. It's really to distinguish the semantics between actions like Compose a new mail and Open email.
So that is basically the strategy behind the behaviour....
The challenge (The other day) I met a bear is a kolmogorov complexity question about the text of a song. As can be seen by looking at its edit history, it has been closed three times as a duplicate of We're no strangers to code golf, you know the rules, and so do I . It's been reopened three time...
@Dennis This isn't vary important, but it seems like quine and 99BB suites may be good ideas for example programs (at least a good idea for PPCG users)
In code-golf submissions, people often like to show how they golfed their program down, striking out the previous byte counts and leaving the current one unformatted. I've seen this done two ways.
The more popular one:
C, 78 75 60 54 48 bytes
The less popular one:
C, 48 54 60 75 78 bytes
I t...
So my personal proxy won't allow WebSocket traffic that isn't WSS and through port 443, which I found out the hard way. Which means I spend like, 30 minutes working out that I can literally just bind a WSS to my HTTPS server.
Reduce a XOR polynomial
Most of us are familiar with the XOR operation between to integers. (^ in python). If you are not here is a brief explanation it is the result of taking the binary representation of the two numbers and xor each digit individually. You can also think of it as adding witho...
Input: 0 <= X <= 2³² - 1
Output: List of numbers in decimal, after recursive splitting in binary format.
Explanation:
Example 1:
Input: 255
Current Output is 255.
Binary representation of 255 is 1111 1111. Splitting it, we get 1111 and 1111, which in decimal are 15 and 15.
Continuing the...
@ais523 I think an explanation of what the elastic tab stop is would be nice in between the two introductory paragraphs, I felt like I had to jump around a bit when reading the question because I've never heard of an elastic tab stop
In the video game Minecraft, you can obtain beacons and put them on pyramid-like structures to give you special effects, such as speed or jump boost.
Your task is to, given an effect, construct the beacon pyramid required for it.
There are multiple sizes of beacon pyramids, required for differe...
Python (52 bytes)
print sum(ord(c) for c in 'Happy new year to you!')
Updated for 2015 thanks to @Frg:
print sum(ord(c) for c in 'A Happy New Year to You!')
Mouse over to see 2016 version:
Try it online!
This is a repost of Evolution of “Hello World!”, originally written by user Helka Homba
It should not be closed as a duplicated, due to meta consensus here.
The original was asked over two years ago and was last active more than six months ago. I have permission from Helka Homba to post this he...
Backstory
The world is looking for a new living planet, where we can find a new generation of life and settle there. A decade ago, they found a planet called HOMESTEAD, which is 1 lakh billion light years away from us. Our scientists had explored that planet from last many years and had sent var...
But I'm not sure if it is technically cheating, because it relies of some flaky abuse of the source code.
When RProgN2 encounters a {without a matching }, it loops back to the second command in the function (Due to a bug that became a feature), as such, this first makes a function, then runs that function, with a single character.
This would keep looping, if ¶ didn't stop it.
A stranger abstraction would be if RPROGN2 theoretically pushed the function that consists of the rest of the program, and otherwise behave the same, because then {... would push the function, then run it's contents, so you have the correctly named function without any extra effort.
It's almost just reading the source code, however doing so by making it a function literal.
But obviously { alone can never be a true quine, as two rules of quines are broken. It's just a single literal, not doing anything to it, and it's a single command.
But {p might be considered a valid quine, because it encodes {p, then uses a different part of the code, which just happens to be a subset, p, to output it.
Write a proper quine whose every rotation is itself a proper quine.
For example, if your source code is abcdef, then:
abcdef would output abcdef
bcdefa would output bcdefa
cdefab would output cdefab
defabc would output defabc
efabcd would output efabcd
fabcde would output fabcde
abcdef would o...