I realize you're being facetious, but do check with your employer that this is OK! Code on StackOverflow is under a CC-SA license, it isn't public domain or even very permissibly licensed.
I realize you're being facetious, but do check with your employer that this is OK! Code on StackOverflow is under a CC-SA license, it isn't public domain or even very permissibly licensed.
http://meta.stackexchange.com/questions/12527/do-i-have-to-w...
The license [1] says that you are free to:
Share — copy and redistribute the material in any medium or format
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Attribution — You must give appropriate credit...
ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
for (Map.Entry<String, Object> entry : map.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); }
private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {
if (fromIndex > toIndex)
throw new IllegalArgumentException("fromIndex(" + fromIndex +
") > toIndex(" + toIndex+")");
if (fromIndex < 0)
throw new ArrayIndexOutOfBoundsException(fromIndex);
if (toIndex > arrayLen)
throw new ArrayIndexOutOfBoundsException(toIndex);
}Below some minimum threshold of complexity, it seems like software ought to cross the idea/expression divide and become copyright-exempt, just as a mathematical formula does. In fact, the example you gave is something that could easily be recreated letter for letter without seeing the original post.
I'd be utterly shocked if that sort of "could have written it from scratch" code ever caused someone an IP problem.
> Starting Feb 1, 2016, all new code contributions to Stack Overflow and Stack Exchange will be covered by the MIT License.
Source: http://meta.stackexchange.com/questions/271080/the-mit-licen...
So, it depends. Code from before then is CC-SA, after it is MIT.
That follow-up post says that they're "going to delay the implementation", so I assume that today it's still all CC-SA. I haven't found any further information, but would love to know it, or be corrected on my assumption.
My company is struggling with the code license situation and I'm stuck with dealing with it for my project. Clear, up-to-date information about it would be fantastic.