Let's say I want make some of my sources publicly available via my blog or other web location.
How do I properly indicate what Open Source license I've applied to the sources? For instance, with the MIT License or The Code Project Open License, should I put something at he top of the source files or should I have something on the web page, or both?
The most common path is to include a licensing notice at the top of files inside block comments - that's the way most likely to ensure that anyone utilizing the code is aware of the license, since the only possible way for it to be decoupled from the code is someone intentionally removing it.
Can't hurt to have it on both but you absolutely need to indicate it in the file itself. A LICENSE file at the root which indicates which license is used throughout would not be a bad idea either.
If you have separate code files, a COPYRIGHT file is suggested. If you post code on a blog, include the license at the top as comment lines. It is also acceptable to reference the license via a link at the top, instead of including it entirely in your code. See the QA at the last link regarding this.
/* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php */
Related
This isn't a strictly programing question, I want to write some guides and documentation for my company. I've noticed that Microsoft has a page for a set of tools that help the contributors of their documentation create and edit said documentation.
It's called Docs Authoring Pack for VS Code. It's a pack of plugins that help you write documentation markdown. From reading it, it supports quite a few features such as embeding images and links to other pages.
My question is, can I use this pack to create a local html file that would work with those features. (For example linking from one page to another with the URL being a relative local path to the main page).
In VS Code I got this testing page with this plugin
I want to know if I can generate an HTML file from this that could be viewed in a browser.
As title.
It is the safest if we go for searching free source and just use them, but it is not always the case that we can find the one that we want. If then, what will happen if I just use images from someone's website in my own project?
Images that you find on the web are licensed in one way or another, as a result it is important to understand the terms of that license.
This question goes over what you can do when your license is being infringed upon.
But from the phrasing of your question it sounds as though you are curious about what will happen if you just take images from other websites regardless of the licences on those images. In most cases, it is unlikely that much will happen as the content owner would have to be aware that you're using their licensed product. But that doesn't mean that you should.
If you were using licensed content and the content owner was aware, they have many options available, from requesting that you remove their content all the way to hiring a lawyer to pursue the issue.
I personally do not recommend just using content without knowing what license it is governed by. It is always better to ask permission first. That being said, Here is a link to a flow chart that may help in deciding if you should/can use an image from the web.
For learning purposes I want to view the html source of sites like amazon.com, ebay etc , After learning I want use it in my work, I don't want to copy and paste the html source.
Points to consider:
1. Hiding html source is unprofessional, here
2. Viewing HTML Source is safe for developers, here
3. All working web professionals do it for learning, here
So can i View HTML Source to learn css styles etc ? or should I get permission from website's owner ?
Any help would be great.
Client side code is always accessible publicly, viewing it or using it for learning purpose is absolutely fine. There is nothing illegal to that. However, if you are using the design of the any website or the part of website such as java-script or css, there should be a copyright notes; just read that once before using it. I don't think all java-scripts and css may have the copyright issues and you can also read the website policy before using it.
That depends.
If you live in the USA and circumvent a copyright protection system (however badly implemented) while viewing and using source code you broke the law. There are many other ways to break the law by misusing other peoples websites (like scraping, leaching, mirroring, hacking, etc). Search for "laws you break every day" and you will see how hard it can be to not break the law, but the rule of thumb is be a nice small fish and likely any laws you break people wont care enough to charge you with.
You can read a source, but you shouldn't use it if not allowed. If the source has a license, you should read it to know.
The HTML/CSS/Javascript code is loaded in your browser and you can watch it as many times as you want without any concern.
yup, it is 100% legal to view and use
I found a website useful for designing my own site and took parts of the code to modify it for my personal use.I have added my content but parts of the html and css are from this original website.
do I attribute the work by providing a link to the original developer's page ? I've done so under the footer but was wondering if more is required to give proper credit.
You do so in whatever manner the license they gave you to use their code says you should, and you should ask the copyright holder if it is unclear.
Legally? It depends entirely on the license that the original author has decided to publish their work under. There are a multitude of open source licenses each with slightly different attribution and reuse requirements (even Stack Overflow)
Morally? That's entirely up to you. If you're using a substantial amount of code, a callout on the page may be appropriate. Maybe just a comment will do. Or maybe no attribution at all if the license (and your conscience) allows it.
Can we include an HTML file / snippet from another HTML file?
My use case is related to how a website is built; in a simple form, a site typically has the same header and footer across the board. It is pretty straightforward if the site is equipped with e.g. PHP so you can do something like the include statement; we can contain the header and footer in separate files and include them later. But, what if the site is purely static i.e. no "back-end" support?
One thing that I had done in the past is to utilize templates in Dreamweaver. This worked but I'd prefer something that is more product-independent.
Thanks.
What you're looking for is Server Side Includes. It used to be available on most hostings, no idea what the situation is today.
Actually, a simple system based on a makefile and, why not, php's command line version, might also be helpful: a simple makefile that visits all php files in a directory, feeds it to php (eg, processes page decoration and stuff) and redirects the output to a corresponding html file should be enough to generate a set of uploadable, 100% static html files.
SSI is a great option if it is available to you as already suggested, I have always used PHP personally but as PHP is not available and if SSI isn't available then there is a JavaScript option as well.
The great thing with the JS option is the server doesn't need to have support for it due to the include scripts being client side. The bad thing is if the client doesn't have JS enabled in the browser the includes won't work. In saying that the vast majority of website users have JS enabled and this is displayed by most websites in the world who employ JS in 1 way or another.
Examples, the first one I found with a 2 second Google uses jQuery, have a look at the info here
There are also some AJAX plugins that could potentially be used for this at the jQuery website if it is a path you're interested in going down.
I hope this helps you :-)