I'll probably add one more rather general tip tomorrow along the lines of "know your flavours" which gives an overview over the unique and useful features of the more popular flavours (recursion, balancing groups, unicode properties)
(focusing on features that are actually useful for golfing)
Define a prepend-append sequence of length n to be a permutation of the numbers 1, 2, ..., n that can be generated by the following procedure:
Start with the number 1.
For each number from 2 to n, place this number to the beginning or end of the sequence (either prepend or append it, hence the ...
Every once in a while I encounter an answer which claims to be Python. However, most Python code is specific to either Python2 or Python3.
Often the answer starts with
Python
Whitch should be fixed to either
Python2
or
Python3
However, this edit is only one character. I need six to make an...
@Optimizer Everything is broken because instead of using the sane 2-minute workaround of adding a shutdown -r now to /etc/crontab he pulls the plug once a day?
I assumed that the reset frequency was selected to be more frequent than the memory exhaustion.
And despite thinking hard for a minute, I can't work out what anime or manga have to do with XKCD, nor any satire or sarcasm which I may have overlooked.
I made a template function isA<T> which determines whether something is a T. Do I need to also make an isAn function to test whether something is a type beginning with a vowel?
Yes, but make sure you check the class name within the function and pass along to the proper one (preferably with a warning) if the wrong one is called.
Ambigious Roman Numeral Magic Squares
(Always happy to hear any clever title suggestions.)
code-golf roman-numerals
Introduction
The king of Ancient Rome is having difficulties determining if a magic square is valid or not, because the magic square he is checking does not include any seperato...
one didn't get funded (I still received the album in question as a digital download for free though). of the others, only one has been produced so far, and I did receive that.
Not a fan of the Urbane. I have (and plan to keep) a phone. I'd rather one that paired to my phone. Seems like it would be better on battery life, price, and size. I also imagine you'd need a separate data plan to use it? If I didn't have a phone, maybe, but at that point I'd rather have a phone than a $1000 watchphone.
The bigger issue for me is use case. I just don't have any need for one. I wore a watch for most of my life, until I started carrying a smartphone with me. At that point it felt redundant.
I don't check the time so often that that's an issue. If I'm at home, work, or in the car, there are clocks available. If I'm not, I'm probably not in a hurry.
When I do end up checking the time, it's normally because I'm standing in line bored somewhere. At that point I now have a smartphone in my hand I can entertain myself with :P
The lowest-scoring question might have been intentionally bad.
Title: How to deal with a fake scientist? Details: What makes you to believe that statistics is something is worth to think about. Isn't that a fake science? Do you think that statistics is a real science? Do you think statisticians should be paid?
EE.SE had nothing interesting.
PS I guess crossvalidated.SE is technically stats.SE.
that being said, I really need to figure out a good way in prelude to decrement two numbers simultaneously and stop a loop when either of them hits zero
Hey everybody, I was looking around the site, and I couldn't find any code-golf questions that were simply "Sort a List", and nothing more. Does anyone know if we've had one? If not, I'd like to ask it.
The goal of this Code Golf is to create a program that sorts a list of strings (in ascending order), without using any built-in sort method (such as Array.Sort() in .NET, sort() in PHP, ...). Note that this restriction excludes using a built-in method that sorts an array descending, and then rev...