Skip to main content

Timeline for When will Brexit happen?

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Apr 13, 2017 at 12:39 history edited CommunityBot
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Apr 3, 2017 at 20:31 comment added Joel Coehoorn I saved 24 more (125 total) by not caring what happens after Brexit, tightening up the loop, and using the format overload for Console.Write() rather than declaring variables. I was starting from SLC's answer and couldn't edit, so I posted it to my own answer. But it's the same basic \r trick that makes it possible, which I wouldn't have found on my own
Apr 3, 2017 at 15:09 comment added TheLethalCoder I think you can save bytes by using a for loop and declaring the variables in that, not sure though.
Apr 3, 2017 at 11:22 history edited adrianmp CC BY-SA 3.0
solution improvement
Apr 3, 2017 at 8:26 comment added TheLethalCoder @Bob I used your interpolation suggestion in my answer, it works well :)
Apr 3, 2017 at 8:15 comment added TheLethalCoder @Bob Sorry I read your suggestion as a new line, my mistake. But yeah the sleep can be removed
Apr 3, 2017 at 8:12 comment added Bob @TheLethalCoder I took that as simply not allowing a "fake" multi-newline approach. A carriage return still overwrites the only thing on the screen. At least one other answer also uses this approach. Also can remove the sleep as it's only important that the display changes once per second, with non-changing updates allowed (see question comments). edit: actually, question comments also explicitly allow the CR...
Apr 3, 2017 at 8:07 comment added TheLethalCoder @Bob The OP states that you must clear the screen.
Apr 3, 2017 at 6:49 comment added Bob More improvements: (x-a).ToString(@"d\:hh\:mm\:ss") is equivalent to ` String.Format("\r{0:d\\:hh\\:mm\\:ss}",x-a)` is equivalent to $@"{x-a:d\:hh\:mm\:ss}" (shorter, interpolated string in C# 6.0). If you do that, you can then further shorten the full "\r"+$@"{x-a:d\:hh\:mm\:ss}" into $"\r{x-a:d\\:hh\\:mm\\:ss}".
Apr 3, 2017 at 6:43 comment added Bob You can also remove the Console.Clear and instead prepend "\r" to the string, e.g. "\r"+(x-a)...
Apr 3, 2017 at 6:25 comment added Bob You can save a bit by doing namespace System{} instead of using System; (which lets you remove the System. on the sleep call).
Apr 3, 2017 at 5:43 history edited adrianmp CC BY-SA 3.0
solution improvement
Apr 3, 2017 at 4:54 comment added Martin Smith new DateTime(2019,3,31) is shorter.
Apr 2, 2017 at 20:34 history answered adrianmp CC BY-SA 3.0