21

I was wondering about the copyright of code snippets from answers. Lets 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?

As mentioned in one answer 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?

I did not post this directly to uservoice since some users might have an opinion about this as well (since its about their answers).