Imo, the piece of code you need is easy enough to find in answers like that. Especially since the link says _"More information here"_, implying that the link is just extra.  
When looking for answers, it's usually a good idea to actually read the answers, instead of blindly clicking the first link you see. 

__TL;DR:__ _Answers like that are fine. Don't edit them._