I will use this proof in manuscript. It is clearly plagiarism if I just write down the proof and do not cite the original content.
However, how do I cite an answer in StackExchange? It is neither a blog post, nor a text in a personal website. It is an answer to a question. Should I go with traditional style such as
[1] Gjergji Zaimi (stackexchange username) “Answer to Question 'Unique ways to keep N balls into K Boxes?' ” https://math.stackexchange.com/a/58756/130361. Aug 2011. Last accessed: 2017-02-12
or is there any formal method to do this?