19 Star 169 Fork 281

飞行器智能感知与控制 / learn_programming

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
GPL-3.0

一步一步学编程

本教程的主要目的是引导大家通过合理的过程和步骤,一步一步掌握编程的理论与技巧,提高学习的效率和效果,并降低学习过程的痛苦指数。和其他传统的教程不同之处主要在于:1) 使用Git来记录学习过程的代码、心得:保存学习过程的进度,能够更好的师生互动; 2) 本教程只提供了学习大纲,需要找适合自己的教程,并自己设计学习进度和安排。请有志于机器学习,计算机视觉的同学脚踏实地的把基础打扎实之后再开始相关专业知识的学习。

注意:

  • 本教程主要是培养并锻炼算法思维,如果只是简单的抄别人的代码,毫无意义,所以大家宁愿慢一点也不要抄!!!
  • 关于本教程的说明,请认真阅读三遍以上!

learn_programming

一、为何学习编程?

编程,英语,数学是通往未来的三个主要钥匙。其中编程是让你实现梦想,英语是让你找到通往梦想的资料,数学是让你构建路径的模型和策略。上述三样能力都是需要长时间积累,很难在短时间突击提高,因此建议各位同学能够脚踏实地把基础打扎实,克服眼高手低的问题。由于研究生阶段学习时间比较短,需要同时学习大量的理论知识并完成大量的编程、实验,如果编程能力太弱,则导致研究过程处处受挫,从而丧失兴趣和目标。如果编程能力足够强大,则很多课题能够通过不断尝试、试错,找到解决问题的办法。总之编程能力的高低对研究生阶段的能力提升起到关键的作用,强烈建议各位同学切实重视编程功力的提升!

很多同学都学习过C语言等课程,但是在学习过程仅仅是学习了语言的用法等,仅仅是学习了编程表面层面的知识,并未将语言和数据结构、算法、编程工具、操作系统等进行有机整合,所以大部分情况下,大家所学到的知识并不能解决实际问题,非常有必要进行系统性的学习和练习。

编程和很多其他的课程不一样,不是看看就能学会,需要不断的练习,不断的debug,不断的反思,不断的重构代码才能学好。其中各种语言是招式,相对好学;而算法、程序性思维是内功,并不容易提高。而内功的高低才正真决定了一个人编程能力的高低,希望大家能够通过坚持不懈的努力提高自己的功力。编程思维是一种综合的解决问题能力,由于计算机需要非常精确的指令才能正常工作,因此需要事前把每一个处理步骤的原理、实现都要搞得非常清楚,这样就锻炼了大家分析问题、设计流程、解决问题、总结反思等多方面的能力。

本教程提供了一个编程能力的综合学习引导,预期需要达到的《能力和技能》主要包括:

通过这个综合练习,为后续研究生阶段研究项目的编程打下坚实的基础,缩短研究过程试错周期,从而让研究生阶段能够学到更多知识、取得更大的成绩,希望大家能够认真对待!

二、如何学习?

大部分的计算机视觉、机器学习算法的底层代码通过C++来实现,另外经典的算法教程通过C/C++来讲授,因此需要把C++学好。但是C++非常博大精深,很难一上来就全部学会,因此需要采用循环迭代的学习方法,即通过多次from the shallower to the deeper的学习过程实现高效率的学习。比较高级、复杂的语言特性不用一上来就去学,可以等基本语法、常用数据结构学的比较扎实之后再着手高级的语法、技巧等。或者等基本语法、用法学完之后,在做练习题目的时候琢磨高级语法特性、技巧,体会为什么要设计这些高级用法,这样的学习有的放矢,效率更高。

主要的学习阶段和步骤分为如下的5个阶段,可以同时进行两个或以上的内容学习和练习,从而提高整体的学习效率。

2.1 Stage 1: C++基础

需要在2周-3周完成:

  • 找一本C++的书 (教材就可以,或者如下的资料),将其中的基本内容快速过一遍(大约4-8天)
  • 在C++基本用法的同时开始编程练习,例如书每一部分的练习题,或者参考《编程练习题》
  • 将其中的练习题做一遍(大约2周,给自己限定一个时间,必须快速完成)
  • 在学习过程考虑,如何更有效的编程,如何提高debug能力
  • 资料(可以使用在线的教程,或者自己找比较合适的):
    • 《C++ 教程》 ,通过这个教程快速学会C++的语法等。
    • 如果对自己有更高的要求,可以学习《C++ Primer》。不过最好还是用上面普通的教程先把基础知识学好之后,把Stage4的小项目做完之后,再学习C++ Primer更有效率。

2.2 Stage 2: 算法

需要在3周-6周完成:

2.3 Stage 3: 在线编程练习

需要在3周-6周完成:

2.4 Stage 4: 综合编程练习项目

需要在2周-4周完成:

  • 可以思考一下,如何将所学的编程知识去解决一些实际问题
  • 通过这个综合练习,运用所学的知识解决一个或者多个实际问题,从而锻炼系统性解决问题的能力,并提高思维水平
  • 如果自己想不到太好的例子,可以参考所列的:《综合练习例子程序》

2.5 Stage 5: 高级技巧

需要在2周-4周完成:

  • 如何把自己代码写的更规范:命名、格式、函数、类等。
    • 参考《编码规范》,将自己写过的代码按照规范进行格式、写法的调整
  • 琢磨如何将前面所写的代码进行重构,如何提高代码的复用能力
    • 思考程序哪里写的不好,不容易理解,如何才能更好理解
    • 程序是否结构不清晰,如何分割成更好的函数、类
    • 思考那些函数、类是可以复用的,可以写成头文件
  • 如何利用CMakePICMake将所有的代码组织起来,一次将自己编写的代码自动编译出来
    • 将自己C++(Stage1),数据结构(Stage2),综合练习项目(Stage4)的程序用CMake组织起来
  • 更进一步学习IDE的使用
  • 研究、学习如何将常用的函数、类组织到一个代码库,后续直接使用
    • 分析哪些函数、类可以复用,将可以复用的写成库
  • 如何让代码更清晰易懂,在什么地方用什么设计模式
    • 分析程序常用几种写法、模式,学习设计模式
    • 按照设计模式的方法,将自己的程序优化一下
  • 掌握多种编程工具的用法
  • 在用的过程多琢磨技巧,并不断总结

2.6 Stage6:计算机基础知识

如果没有学过操作系统、计算机原理、嵌入式系统、编译原理、计算机网络等课程,可以快速学习这方面的知识,学过这方面的知识会提升大家对开发大型、面向实用系统的开发能力。主要包括内容包括

2.7 Stage 7: 高级项目

需要在2周-4周完成,为更好的提高自己的能力建议完成:

  • 在学习基本工具的基础上,通过完成一个更复杂一点的项目,将编程语言、数据结构、工具、Debug、设计模式等多种技能进行综合练习,巩固所学的知识和技能。

2.8 Stage 8: 高级C++

需要在2周-4周完成,为更好的提高自己的能力建议完成:

  • 主要学习C++ 11, C++14, C++20等最新功能、函数。
  • 目前主流的高端项目使用了大量的高级C++技巧,因此为了能编写复杂软件系统,建议好好学习一下高级C++

2.9 恭喜通关!

如果你能坚持到这个阶段,说明你编程功力很强了!可以自由遨游于机器的世界,充分发挥你的能力去创造奇迹!

三、如何提交作业,如何使用Git,Markdown

请认真阅读具体要求和操作步骤,如果有不清楚的地方请及时咨询。

3.1 具体要求:

  1. 根据自己的学习过程,将所编写的程序保存到对应的目录里,分门别类存放程序、文档(养成条理的习惯)
  2. 学习使用《Git》,将代码、报告提交到Gitee
  3. 可以参考《报告例子》来写每周的报告。其中关于Markdown的用法可以通过学习资料进行学习

3.2 具体操作步骤:

git add -A
git commit -m "Change log"
  • 通过git push origin master上传作业到自己的项目里。

每次完成一个作业就提交代码一次,或者每天完成之后提交一次代码。

其他说明:

  • 关于Git和Gitee的操作可以深入学习《Git教程》

  • 可以参考《Gitee增加用户》来增加用户,将邀请链接地址发送给bushuhui@nwpu.edu.cn (重要步骤,请不要忘记遗漏!),从而加提高协同便捷性。大家提交作业后,我会在大家的项目里写入批注、建议等等,从而构建良好的反馈机制,能够更有效的取得学习效果。

  • 如果无法提交代码到服务器,可以尝试将服务器最新的代码更新到本地,执行操作: git pull origin master。合并完成之后再执行代码提交git push origin master

  • 关于Markdown,可以参考《Markdown教程》,可以安装Typora软件来编写Markdown,这个软件最大的特点是能够及时看到最终的效果。

3.3 进度安排

由于本课程只是后续科研的基础,所以需要快速、高质量完成编程的学习,但是编程能力的提高需要系统性的锻炼,需要学习的内容比较多,如果按照一般的学习方法则花费的时间太久,因此需要锻炼并提升自己的快速学习能力。上面所列的8个阶段的学习,最好能同时进行2-3个以上内容的学习、练习。例如在做Stage3的LeetCode练习题的时候,可以同步做Stage4的小项目练习。

因为研究生阶段需要学习的知识、技能非常多,按照传统的学习方法已远远无法满足大量知识、技能的学习。在本练习过程可以改变学习的策略,即通过项目牵引的方式进行学习,不是让大家囫囵吞枣,而是调整学习过程的一些先后顺序。尽可能早的完成 《第四阶段的小项目》 的练习,虽然基础可能不是特别牢固,但是克服自己心中的恐惧,尽可能用已有的知识,通过改造示例程序去完成第一个小项目。在做到过程发现缺少哪些知识、技能,然后在整个过程有意识的去补相关的知识、技能。

具体的进度安排可以参考下面的进度图,其中每个色块表示当前阶段开始、结束、以及持续的时间。下面的时间、进度安排只是建议,大家需要根据自己的能力、时间合理安排自己的进度,但是核心的原则是尽最大努力同时进行2-3个内容同步学习和练习。

suggested_progress

四、学习的建议

本学习材料主要针对有意提高自我编程能力的学生,通过本学习材料能够学习得到研究生阶段所需要的编程基础知识、技能。通过系统化的练习能够将所学的知识串联起来,从而提高学习的效率和效果。由于人工智能技术飞速的发展,所以想要在研究生阶段取得更好的成绩需要非常强的自学能力,在学习本系列教程的过程中,需要自己不断的反思,如何才能更有效的学习?怎么才能抓住所学科目的重点?如果遇到不会的问题,如何去找资料?什么样的问题去问?什么样的问题要自己去找答案?

本教程和习题和传统的课程很大的不同点在于:必须通过自己的编程、实践,唯有自己亲自练习才能真正学到各个科目的精髓,才能切实地提升自己的能力,从而摆脱眼高手低的问题。另外本教程给出的参考资料并不是很完善,需要自己去找适合自己的学习材料,这是为了锻炼自己找资料的能力。

  1. 每次完成一个编程题目就提交一次代码,或者每天完成学习、练习之后就提交一次代码。

  2. 要有良好的心态,这是为自己学习,不是应付一件差事。未来的世界是机器的世界,如果不会写程序将寸步难行。学习写程序和成为码农没有必然的联系,而是扩展自己认知范围的一种重要方向,因为程序性思维是一类非常重要的思维技能。编程作为机器时代的必备技能,如果不会编程将会是未来的“文盲”,所以需要从认识上尽可能降低排斥心理。在一个小学生都在学习编程的时代,作为一个20多岁精力最为旺盛的研究生如果不会写程序,如何面对这个时代?

  3. 编程、算法和很多其他课程不一样,不是花几天突击一下就能提高的;而是需要坚持一段时间持续不断的锻炼、思考,突然一天才发现自己能力提升了。因此建议大家根据自己其他课程、时间等,合理安排学习编程的时间,坚持每周都做一些题目,每周至少抽出半天来练习编程和算法。

  4. 不能直接抄已有的程序,或者抄别人的程序,如果自己不会要自己去想,去找解决方法,或者去问。如果直接抄别人的代码,这样的练习一点意义都没有。在这个阶段大家静下心提高编程思维能力,为后续的研究打好基础,否则后续的研究过程不仅做不了深入的研究,而且做东西会比较慢。如果感觉太难,可以做的慢一些,但是坚持自己思考、自己编写代码这个练习重要的是通过自己思考、尝试,从而构建自己的思维系统,只有通过练习才能锻炼并提高自己的真正的能力

  5. 请先遍历一遍这个文件夹和所有的子文件夹,了解有什么内容,资料。各个目录里有很多说明文档,如果不会先找找有没有文档,如果找不到合适的文档就去网上找找。通过这个过程锻炼自己搜索文献、资料的能力。

  6. 不要想一次就把编程、算法学精通!由于存在大量的概念、复杂思维、大量的技巧等,比较短的时间大部分人的大脑是无法接收并理解如此多的东西,因此使用iterative学习方法比较有效率。先把简单的C++/数据结构的书、教程学完一遍,然后开始练程序,等练完之后再进入更深一层的理论学习,例如《C++ Primer》或者《算法导论》等书。编程和其他课程有非常大的不同,需要自己在编程过程体会每个知识点的具体含义,只有在实际编程过程才会学到很多书上没有的技巧、解决问题的思路等等。一句话就是:不要怕,马上开始真实的练习!

  7. 做习题的过程不要着急,如果感觉难,无从下手,可以在自己之前的代码基础上修改,逐步实现需要的功能;或者想办法简化任务,等简单的完成之后在增加细节,直到原始问题被解决。只有自己写才最锻炼,看上去慢,实际上是最快,最有效的学习方式,这样才能更深刻的理解算法的思维。要把算法思维搞懂,只要能搞懂,后面的内容学起来就很快。其实算法思维没有几类,前面的真正掌握了,后面的学起来很快的。

  8. 在学习、编写练习题目的时候,有太多概念、操作过程复杂,脑子比较混乱,如果这样不要着急!慢慢来!本教程主要目的,就是要你脑子糊涂,然后通过自己的思维把各种关系、流程理顺,从而学会如何思考解决复杂问题。本学习的主要目的是要强化这个由混乱到清晰的过程,而不是最终的代码,这就是内功心法。编程语言等招式通过记忆就可以学会,而最重要的思维、内功别人没有办法教,只有自己悟出来的才算是真正掌握。

  9. 因为研究生阶段需要学习的知识、技能非常多,按照传统的学习方法已远远无法满足大量知识、技能的学习。在本练习过程可以改变学习的策略,即通过项目牵引的方式进行学习,不是让大家囫囵吞枣,而是调整学习过程的一些先后顺序。尽可能早的完成 《第四阶段的小项目》 的练习,虽然基础可能不是特别牢固,但是克服自己心中的恐惧,尽可能用已有的知识,通过改造示例程序去完成第一个小项目。在做到过程发现缺少哪些知识、技能,然后在整个过程有意识的去补相关的知识、技能。

  10. 这些课题最好使用《Linux》以及Linux下的开发工具来做。逼迫自己使用《Linux》,只有多练、多用才能快速进步。如果实在太难,先在虚拟机里装一个Linux(例如Ubuntu,或者LinuxMint等),先熟悉一下。但是最终需要学会使用Linux。

  11. 制定计划,严格按照自己设定的时间节点来完成。如果有拖延症,努力克服自己的拖延症

  12. 写程序要细心,一个很小的错误导致程序不能正确运行。通过不断的debug提高自己排错的能力。

  13. 学习过程要多思考,思考什么是程序?程序为什么这样写?有没有更好的方法来解决问题?怎么才能优化地更好,让程序执行的更快?怎么才能把函数、功能封装起来。总之要多想。

  14. 不仅要将程序写出来,还要把写程序过程中遇到的问题,如何解决的都写到报告里。报告要包括:程序目的,算法,难点问题,结果,思考等。

  15. 如果学习基本语法、写基本的C++程序疲惫了,可以尝试做一下《第四阶段的小项目》或者《第三阶段的算法练习题》换换脑子。通过做小项目或算法练习题,发现自己的短板,从而有针对性的学习。

  16. 这个练习的最主要的目的是通过《Stage4的综合练习》来牵引学习C++,数据结构、算法等。通过这个学习过程让自己学会一种思维,如果遇到解决不了的问题,如何去找到解决这个大、难问题的子问题,并通过什么途径一个一个去解决,从而最终把大的难题解决。

  17. 要相信奇迹会发生,自己只要能坚持把Stage4做完,能力就会有比较大的提升。根据以往的经验,这个练习题做完的同学,解决问题、编程思维等能力都有很大的提升,所以需要让自己坚信,内功真的需要一层一层修炼。

  18. 完成编程练习,《Stage4的综合练习》等,往往编写的程序比较混乱、代码不清晰、复用能力比较弱。需要通过多次的《代码重构》来提高自己的综合编程能力,在多次的代码重构过程中,提升自己的逻辑思维能力、工具和技巧等方面的能力。

五、相关学习资料参考

在上述内容学习完成之后,可以进行机器学习、计算机视觉方面的学习与研究,具体的资料可以参考:

  1. 飞行器智能感知与控制实验室 - 培训教程与作业
  2. 机器学习教程与作业
  3. 《一步一步学SLAM》
  4. 《一步一步学ROS》
  5. 飞行器智能感知与控制实验室-研究课题
  6. 编程代码参考、技巧集合
    • 可以在这个代码、技巧集合中找到某项功能的示例,从而加快自己代码的编写

5.1 工具的使用教程等

5.2 参考资料:

GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

简介

一步一步学编程 展开 收起
GPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/pi-lab/learn_programming.git
git@gitee.com:pi-lab/learn_programming.git
pi-lab
learn_programming
learn_programming
master

搜索帮助