I was wondering about the copyright of code snippets from answers. Let's say you ask a question and the solution consists of ten lines of code, which are given in an answer. Are there any restrictions about the use of that code?
It seems that the content of this page is under the creative commons license. So does one have to attribute the author if code is used in an open source project? Can it be legally used in closed source projects at all?
I guess ten lines of code are not really problematic, but is there a critical number of lines?