├── img
├── jgs.jpg
└── thread
│ ├── thread-1.png
│ ├── thread-2.jpg
│ ├── thread-3.jpg
│ ├── thread-4.jpg
│ ├── thread-5.jpg
│ └── thread-6.jpg
├── README.md
├── java jdk学习笔记
└── java注释 Annotation.md
├── .gitignore
├── 技术选型介绍
└── README.md
├── 我的10年历程
└── README.md
├── java并发编程
└── README.md
└── LICENSE
/img/jgs.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/jgs.jpg
--------------------------------------------------------------------------------
/img/thread/thread-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-1.png
--------------------------------------------------------------------------------
/img/thread/thread-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-2.jpg
--------------------------------------------------------------------------------
/img/thread/thread-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-3.jpg
--------------------------------------------------------------------------------
/img/thread/thread-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-4.jpg
--------------------------------------------------------------------------------
/img/thread/thread-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-5.jpg
--------------------------------------------------------------------------------
/img/thread/thread-6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ibc789/my-java-study/HEAD/img/thread/thread-6.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #### 工作这么久哭过、笑过、无奈过、也激情过,现在终于可以静下心来,在工作之余,对以往用到的技术进行汇总和总结,带着爱❤️和梦想生活着。
2 | ## 附带一张即刻时间架构师学习线路图
3 |
4 | 
5 |
6 |
--------------------------------------------------------------------------------
/java jdk学习笔记/java注释 Annotation.md:
--------------------------------------------------------------------------------
1 | # java注释 Annotation
2 | 网络介绍自从 JDK5之后开始支持注释(Annotation),可以在原始码中使用注释,对编译程序提供额外 编译提示,或提供应用程序执行时期可读取的组态信息。注释可以仅用于原始码,编译后留 在.class文件仅供编译程序读取或开放执行时期读取 。
3 | # 1. Java 内置标准注释
4 | 这里先介绍自 Override、 自Deprecated、@SuppressWarings、SafeVarargs 与@FunctionalInterface。
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled class file
2 | *.class
3 |
4 | # Log file
5 | *.log
6 |
7 | # BlueJ files
8 | *.ctxt
9 |
10 | # Mobile Tools for Java (J2ME)
11 | .mtj.tmp/
12 |
13 | # Package Files #
14 | *.jar
15 | *.war
16 | *.nar
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 |
--------------------------------------------------------------------------------
/技术选型介绍/README.md:
--------------------------------------------------------------------------------
1 | ### 一些常见的服务注册发现工具
2 | 1. **etcd**:这是CoreOS的创建者提出的工具,可面向容器和宿主机提供服务发现和全局配置存储功能。它在每个宿主机上都有基于HTTP协议的API和命令客户端。地址为:https://github.com/etcd-io/etcd
3 |
4 | 2. **Consul**:该服务发现工具有很多高级的特性,列如配置健康检查、ACL功能、HAProxy配置等,因此能够脱颖而出。
5 |
6 | 3. **ZooKeeper**:该工具较上面的两个语言而言比较老旧,提供了一个更加成熟的平台,也提供了一些特性。
7 |
8 | 4. **Confd**:旨在基于服务发现的编号动态更新配置应用程序。该系统中包含了一个能够检测节点变化的工具,以及一个根据获取到的值来生成配置文件的模板系统,能够根据服务配置的动态变化重新加载受影响的应用集群。
9 |
10 | 5. **Dubbox**: 对于Dubbox或者Spring Cloud这种RPC框架,服务发现是自带机制,不是什么难题。但是对于没有服务治理或者RESTful的PHP服务而言,如何将现有的服务治理框架融合进去,达成跨语言、跨平台服务治理,便是一个很大的问题。
11 |
12 | 6. **Service Mesh**:根据集群状态动态调整负载均衡策略和应用上线下是Service Mesh的一个技术特点,另外Service Mesh还提供了夸语言、夸通信模式的服务自发现技术
13 |
--------------------------------------------------------------------------------
/我的10年历程/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "10年历程总结"
3 | author: "ibc789"
4 | date: 2019-03-07T13:39:15+08:00
5 | draft: true
6 | ---
7 |
8 |
9 |
10 | 人生没有平坦的路,一切都要自己去争取,从09年到现在,大约10个年头,自从毕业,一直做着IT相关的开发工作,总的来说,有喜悦、有伤心、当然自然少不了折腾。
11 |
12 |
13 | ##### 2009-2010年
14 | 我在一家小规模的创业公司工作,干的是java开发,当然刚开始工作肯定是打杂,小公司自然没有多少人,什么都的要自学,但公司没有大牛带也没人教,那时候的苦恼我相信很多人都经历过,2010年的时候公司已经发不起工资了,俗话说人往高处走,水忘低处流,其实老板人很不错,很有人情味,但我也吃饭,所以我选择了主动离职,离开的时候我很感谢老板,因为是他让我养成了自学的能力,和独自解决问题的能力。
15 |
16 | ##### 2010-2014年
17 | 我来到了第二家公司,当时我记得正值夏天高温季节,找工作那个受罪,找了一个月,记得当时面试,面试官就问了一个问题,能加班吗?,我的回答是肯定的,其实我很惊讶面试了这么多家公司,还有不问技术直接问能不能加班的,后来我知道,我原来面试的是家外包公司,主做电力外包(人头外包、项目外包),从辞职后,我就开始了外包生涯,相比其他外包公司,我算是舒服的,早晨8点半上班,晚上4点半下班,中午2个小时午休,一日三餐都管(起项目不紧张的情况下比较轻松,在项目紧张的情况下,还是加班加点的没休息[回到宿舍大约都凌晨1点了]),那段时间,可以算的上在天堂了(开玩笑的),就在这段时间里,我居然胖了,明显的身体发福(其实是伙食太好了),在这段时间里,我从打杂的变成了主力,主要是对业务的了解,当然技术也提升了不少,但做外包不是长法,代码层级无非就是CRUD(框架级别的早就被封装,我们只是拿来主义),时间长了人堕落了,也没进步空间,我也想了好久,想去外面看看,多学习,多交流才能使人进步,正好在我想离开的时候,我的老同学 Miss Wang找到了我,我被他的话语说服了,最终选择辞职,加入了老同学的创业团队。
18 |
19 | ##### 2014-2016年
20 | 我加入了创业团队,开发了线电子银行承兑汇票交易系统、撮合系统、微信公众号(公司我就不说了圈子太小,一说就知道了,虽然老板不靠谱,总归要给点面子),这段时间是最折磨人的时候,雷布斯(雷军)从说过,只有傻子才会创业,之前一直不明白,后来明白了,在这段时间里,我从一个只会写java的程序员被逼学会了node、php、angularjs,因为人少,加上投资人也不愿意多花钱招人,被逼无奈,只有硬着头皮上,所有的都要自己去学习,几乎是天天加班,周末都没有休息过(项目要赶着上线),起初半年时间里,团队真的很和谐,股份都没有签相关的合同,所有事都是凭着感情和信任去做的,因为我相信 Miss wang,Miss wang相信 Miss lin ,Miss lin 相信 Miss zhu(为人处世很正直),Miss zhu 相信 Miss Huang(和秦朝赵高很像,在我们团队里老大,一人之下万人之上,有时候我感觉老板是胡亥),一层套一层的人际关系,我记得在我14年决定从外包公司离开时,老大单独和我吃了个饭,让我留心下股份的事情口说无凭,其实说实话我也没太在意,因为我相信我的老同学,在项目上线后,我们开始融资,当时,有好几个风头公司来我们公司尽调,其中包括盛大资本、上海钢联等。在没有用户和交易量的情况下,项目也被估值在4000万左右,我是又欣喜,又高兴,天天乐开了花,但好景不错,由于投资人(对外说是投资人,对内其实是我们的老板)的不信任和猜疑,团队在16年的时候,土崩瓦解(其中有外界因素和内在因素,我们古人说的好,天灾多的时候,人祸也少不了),一开始谈好的股份结果变成了期权,我气炸了,打人的心情都有,有时候想想,在理论也没有用,因为没签任何协议,都是口头的,所以这次创业对我来说,失去了一次发财的机会和吸取了一次经验教训,最终团队在16年6月的时候不欢而散。
21 | 2016-1017年,是个比较惨的时候,我记得我们几个人出来又组成一个团队,开始做着和上家公司同样的项目,为什么做,因为我们想在博一把,不甘心,可能会有人认为,为什么会有这样的想法,我只能告诉你,当一个项目快要赚钱而没有赚到钱时,措施机会是多么的重要,money就能这样的从你手上溜走,好景不长,团队中的一个人,有了其他想法,换句话说就是不和群(其实有好多故事,我就不一一讲了),被逼无奈,我们从上海打道回府,在南京成立了新的公司。
22 |
23 | ##### 2017-2018年
24 | 回到南京后,我们也做着相同的项目,项目的团队已经精简在精简,也不会出现勾心头角,尔虞我诈,起初我们有新投资人的支持,但有些事情,是你去努力都没有结果的事情,最终我们放弃了项目,想着研发其他项目,在这段时间,我们也做了好几个项目,有电商、区块链等,但迫于看不到希望,新投资人又不投资,最后不了了之。 17年我也收获了爱情,和自己的孩子。
25 |
26 | ##### 2018-2019年
27 | 我加入了一家小公司,主做,大数据日志审计、安全监控产品的初创公司,虽然说初创但产品已经很成熟,这让我想加入的原因,最近这段时间,我总结了我的过去,限于篇幅,加上本人文采比较懒,只能说到这里,但我还要说,这么多年,我没有坚持做过笔记,其实就是本人太懒,说其他的都是借口,现在终于能静下心来,好好专研技术,一起从今天19年开始。
28 |
29 |
--------------------------------------------------------------------------------
/java并发编程/README.md:
--------------------------------------------------------------------------------
1 | ## java并发编程基础
2 | #### 1、什么是线程和进程
3 | 在介绍什么是线程之前,有必要对进程进行了解下,在操作系统中线程是进程中的一个实体,线程并不会独立存在,进程是资源分配和调度的基本单位,一个进程中最少有一个线程,多个线程共享一个进程内的资源。
4 | 总结
5 | * 进程:程序运行资源分配的最小单位,进程内部有多个线程,会共享这个进程的资源
6 | * 线程:CPU调度的最小单位,必须依赖进程而存在。
7 |
8 | #### 2、什么是并发和并行
9 | * 并行:指两个或多个事件在同一时间点发生。列如我们在学生时代,排队打饭,有多个窗口可以同时排队打饭。这就是并行。
10 | * 并发:指单位时间内,处理事情的能力。列如我们在排队打饭时,单个窗口5分钟内可以处理10个人打饭,这就叫做并发。
11 |
12 | #### 3、什么是同步和异步
13 |
14 | * 同步:所谓同步,就是发出一个功能调用时,在没有得到结果之前,该调用就不返回或继续执行后续操作。
15 | * 异步:异步与同步相对,当一个异步过程调用发出后,调用者在没有得到结果之前,就可以继续执行后续操作。当这个调用完成后,一般通过状态、通知和回调来通知调用者。对于异步调用,调用的返回并不受调用者控制。
16 |
17 | #### 4、如何学习好java并发编程
18 | 是不是总有一种感觉,在项目开发遇到问题时,打比方在了解一些并发工具类的使用时,会查阅相关资料,但过段时间又忘了,总感觉我已经学习了好多知识,但还是搞不懂,有时候好不容易解决这个问题,但又不知道这样做是不是对的或者是最优方案,那怎么样才能学习好并发编程? 其实在之前我也遇到过这样的问题,其实就2点,一个是从现象看本质,深入源码学习,二个是对整体并发工具类有个大体了解,最起码能知道有哪些工具类,在解决实际问题中,他们的优缺点是什么。有些人会问,那我已经知道这些并发工具类的使用用途,源码也看了,但他们为什么这样设计,这样设计有什么好处,我只能说这样的问题只有问并发编程大师Doug Lea了。附带一张java并发编程图谱(来自于网络)
19 | 
20 |
21 | #### 5、java多线程并发三个核心问题:分工、同步和互斥
22 |
23 | * 分工:列如在装修房屋时,装修公司的工作就是把房屋装修好,交接给客户进行验收,装修公司在安排任务时为了提高效率,安排木工负责打衣柜、橱柜,电工负责电线铺设等,通俗点讲就是安排不同的人做不同的事。在Java世界里,Java SDK 并发包里的 Executor、Fork/Join、Future本质上也是一种分工。
24 | * 同步:不过是一个线程执行完了一个任务,如何通知执行后续任务的线程开工而已
25 | * 互斥:所谓互斥,指的是同一时刻,只允许一个线程访问共享变量。
26 |
27 |
28 |
29 |
30 | #### 6、在JDK中已经明确说明了只有2中方式创建线程如下,第一种就是实现Runable接口的run方法、第二种就是继承Thread类重写run方法,另外一种大多数人可能会认为是第3种方式实现Callable接口,
31 | ```java
32 | There are two ways to create a new thread of execution. One is to
33 | declare a class to be a subclass of Thread. This
34 | subclass should override the run method of class
35 | Thread. An instance of the subclass can then be
36 | allocated and started. For example, a thread that computes primes
37 | larger than a stated value could be written as follows:
38 | ```
39 | * **6.1、通过实现Runable接口,如下**
40 | ```java
41 | public class RunableTest {
42 |
43 | public static class RunableTask implements Runnable{
44 | @Override
45 | public void run() {
46 | System.out.println("hello world");
47 | }
48 | }
49 | public static void main(String[] args) {
50 | RunableTask RunableTask = new RunableTask();
51 | Thread thread = new Thread(RunableTask);
52 | thread.start();
53 | }
54 | }
55 | ```
56 | 上述代码实现Runable接口的run方法,这样做的好处是RunableTask可以在继承其他类利于扩展,坏处是不能用this关键字获取当前线程相关信息,必须通过Thread.currentThread()方法来获取。
57 |
58 | * **6.2、通过继承Thread类,如下**
59 | ```java
60 | public class ThreadTest extends Thread {
61 |
62 | public static class ThreadTask extends Thread{
63 | @Override
64 | public void run() {
65 | System.out.println("hello world");
66 | }
67 | }
68 | public static void main(String[] args) {
69 | ThreadTask threadTask = new ThreadTask();
70 | threadTask.start();
71 | }
72 | }
73 |
74 | ```
75 | 1、上述代码创建一个ThreadTest类,在main函数中创建ThreadTest的实例,并调用start方法启动线程。注意当然调用start方法后,线程并没有马上执行,而是处于就绪状态,这个就绪状态指线程除了获取CPU资源外已经获取了其他资源,等待获取CPU资源后才真正是运行状态,当然运行完run方法后,线程终止结束。
76 |
77 | 2、继承的好处是可以在run方法中直接可以使用this关键字获取当前线程相关信息,而不用在使用Thread.currentThread()法,但坏处是,我们都知道java是单继承,这样做不利于扩展。
78 |
79 | * **6.3、通过实现Callable接口,如下**
80 | ```java
81 | public class CallableTest {
82 |
83 | public static class CallableTask implements Callable{
84 | @Override
85 | public String call() {
86 | return "hello world";
87 | }
88 | }
89 |
90 | public static void main(String[] args) {
91 | try {
92 | CallableTask callableTask = new CallableTask();
93 | FutureTask futureTask = new FutureTask<>(callableTask);
94 | new Thread(futureTask).start();
95 | String res = futureTask.get();
96 | System.out.println(res);
97 | }catch (Exception e){
98 | e.printStackTrace();
99 | }
100 | }
101 | }
102 | ```
103 | 1、上述代码是通过FutureTask方式运行线程。
104 |
105 | 2、它比Runable和Thread的优点是它可以有返回值,缺点是在使用FutureTask的get方法获取返回值时它是阻塞的。
106 |
107 | 3、call接口可以抛出异常,而Runable必须通过setUncaughtExceptionHandler()设置异常,才能在主线程中捕获到子线程的异常。
108 |
109 | 4、调用start方法后再次调用报IllegalThreadStateException异常,如下源码所示
110 | ```java
111 | public synchronized void start() {
112 | /**
113 | * This method is not invoked for the main method thread or "system"
114 | * group threads created/set up by the VM. Any new functionality added
115 | * to this method in the future may have to also be added to the VM.
116 | *
117 | * A zero status value corresponds to state "NEW".
118 | */
119 | if (threadStatus != 0)
120 | throw new IllegalThreadStateException();
121 |
122 | /* Notify the group that this thread is about to be started
123 | * so that it can be added to the group's list of threads
124 | * and the group's unstarted count can be decremented. */
125 | group.add(this);
126 |
127 | boolean started = false;
128 | try {
129 | start0();
130 | started = true;
131 | } finally {
132 | try {
133 | if (!started) {
134 | group.threadStartFailed(this);
135 | }
136 | } catch (Throwable ignore) {
137 | /* do nothing. If start0 threw a Throwable then
138 | it will be passed up the call stack */
139 | }
140 | }
141 | }
142 | ```
143 |
144 |
145 |
146 |
147 | * **6.4、他们3者关系如下**
148 |
149 | | Runable接口 | Thread类 | FutureTask |
150 | | ------ | ------ | ------ |
151 | |  |  |  |
152 |
153 |
154 |
155 | #### 7、java线程的生命周期
156 |
157 | * **7.1、java线程的生命周期如下图所属(图片来源于网络和书籍)**
158 |
159 | | 来源于网络 | 来源于阿里巴巴码出高效 |
160 | | ------ | ------ |
161 | |  |  |
162 |
163 |
164 | 1、如上图所式,线程有5中状态 新建状态(NEW)、就绪状态(RUNNABLE)、运行状态(RUNNING)、阻塞状态(BLOCKED)、死亡状态(DADE)
165 |
166 | 2、NEW新建状态,是创建线程未启动状态,
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------