Skip to main content

Questions tagged [code-snippets]

For questions about small, self-contained pieces of code within the context of open projects.

Filter by
Sorted by
Tagged with
5 votes
2 answers

Different OSS license for LaTeX project source and code listings

I am currently writing a technical document with various code listings and diagrams. I would like to release the actual text under the GNU-FDL license, while keeping the code listings under GNU-GPL V3....
1 vote
1 answer

How to properly give credit to gpl3 code snippet

I have a simple MIT licensed project and need to include a about 10 lines of GPL3 code (some math stuff that needs to be the same). I know that i need to change the license of my project, give credit ...
1 vote
1 answer

Where can I find a final, authoritative, clear list of how to handle "license snippets" for common licenses?

I am looking for an authoritative, clear and up-to-date document on what exactly a person or an institution has to do for the so-called "license snippets"/"license notice" for ...
3 votes
1 answer

Google Android Codelab code snippets license

Let us say I create a recycler view for MyFeedItem using snippets from this codelab I copy snippets from the mentioned codelab to create below file first class SleepNightDiffCallback : DiffUtil....
2 votes
1 answer

Can I use and distrubute code posted on JSFiddle

I'd like to use code posted on JSFiddle in a project but do I have permission to do so? I read the terms of service but they do not mention anything about licensing the code they host. Instead its ...
5 votes
1 answer

Giving credit for code snippets

I'm not sure if what I'm about to ask is a daft question, but here goes, I'm currently developing a website of my own which I'm looking to launch as a possible business in the new year, most of the ...
4 votes
1 answer

What is defined as trivial code when licensing a project

I am creating a project I am thinking about open sourcing but I am concerned about the licensing issue of what exactly is trivial code. I am concerned because if I did not know how to do something I ...
12 votes
1 answer

How to mark a copied Apache v2 piece of code?

As stated in the tile, I want to know how should one mark code(functions or pieces of code smaller than 50% of the source file) copied from non copyleft sources (e.g Apache) ?
15 votes
3 answers

Is it OK to remove the license terms for a code snippet?

A while ago, I encountered an edit suggestion on Stack Overflow. The OP had posted a snippet that was under the GPL, and included the GPL in the snippet. The editor tried to remove the GPL as it was ...