> put a comment in saying where you got the idea from (with a link)
StackOverflow content is licensed under CC BY-SA, so you're legally required to do that if you copy code from an answer. (Unless it's so trivial the code is not copyrightable, but it's better to be on the safe side and attribute the source correctly anyway.)
StackOverflow content is licensed under CC BY-SA, so you're legally required to do that if you copy code from an answer. (Unless it's so trivial the code is not copyrightable, but it's better to be on the safe side and attribute the source correctly anyway.)