1=============================================================================== 2 3Bounded MPMC queue 4http://www.1024cores.net/home/code-license 5 6Copyright (c) 2010-2011 Dmitry Vyukov. 7All rights reserved. 8 9Redistribution and use in source and binary forms, with or without 10modification, are permitted provided that the following conditions are met: 11 121. Redistributions of source code must retain the above copyright notice, this 13 list of conditions and the following disclaimer. 142. Redistributions in binary form must reproduce the above copyright notice, 15 this list of conditions and the following disclaimer in the documentation 16 and/or other materials provided with the distribution. 17 18THIS SOFTWARE IS PROVIDED BY DMITRY VYUKOV "AS IS" AND ANY EXPRESS OR IMPLIED 19WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 21EVENT SHALL DMITRY VYUKOV OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 22INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 24PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 25LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29The views and conclusions contained in the software and documentation are those 30of the authors and should not be interpreted as representing official policies, 31either expressed or implied, of Dmitry Vyukov. 32 33=============================================================================== 34 35matching.go 36https://creativecommons.org/licenses/by/3.0/legalcode 37 38Creative Commons Legal Code 39 40Attribution 3.0 Unported 41 42 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 43 LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN 44 ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 45 INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 46 REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR 47 DAMAGES RESULTING FROM ITS USE. 48 49License 50 51THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE 52COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY 53COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS 54AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. 55 56BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE 57TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY 58BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS 59CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND 60CONDITIONS. 61 621. Definitions 63 64 a. "Adaptation" means a work based upon the Work, or upon the Work and 65 other pre-existing works, such as a translation, adaptation, 66 derivative work, arrangement of music or other alterations of a 67 literary or artistic work, or phonogram or performance and includes 68 cinematographic adaptations or any other form in which the Work may be 69 recast, transformed, or adapted including in any form recognizably 70 derived from the original, except that a work that constitutes a 71 Collection will not be considered an Adaptation for the purpose of 72 this License. For the avoidance of doubt, where the Work is a musical 73 work, performance or phonogram, the synchronization of the Work in 74 timed-relation with a moving image ("synching") will be considered an 75 Adaptation for the purpose of this License. 76 b. "Collection" means a collection of literary or artistic works, such as 77 encyclopedias and anthologies, or performances, phonograms or 78 broadcasts, or other works or subject matter other than works listed 79 in Section 1(f) below, which, by reason of the selection and 80 arrangement of their contents, constitute intellectual creations, in 81 which the Work is included in its entirety in unmodified form along 82 with one or more other contributions, each constituting separate and 83 independent works in themselves, which together are assembled into a 84 collective whole. A work that constitutes a Collection will not be 85 considered an Adaptation (as defined above) for the purposes of this 86 License. 87 c. "Distribute" means to make available to the public the original and 88 copies of the Work or Adaptation, as appropriate, through sale or 89 other transfer of ownership. 90 d. "Licensor" means the individual, individuals, entity or entities that 91 offer(s) the Work under the terms of this License. 92 e. "Original Author" means, in the case of a literary or artistic work, 93 the individual, individuals, entity or entities who created the Work 94 or if no individual or entity can be identified, the publisher; and in 95 addition (i) in the case of a performance the actors, singers, 96 musicians, dancers, and other persons who act, sing, deliver, declaim, 97 play in, interpret or otherwise perform literary or artistic works or 98 expressions of folklore; (ii) in the case of a phonogram the producer 99 being the person or legal entity who first fixes the sounds of a 100 performance or other sounds; and, (iii) in the case of broadcasts, the 101 organization that transmits the broadcast. 102 f. "Work" means the literary and/or artistic work offered under the terms 103 of this License including without limitation any production in the 104 literary, scientific and artistic domain, whatever may be the mode or 105 form of its expression including digital form, such as a book, 106 pamphlet and other writing; a lecture, address, sermon or other work 107 of the same nature; a dramatic or dramatico-musical work; a 108 choreographic work or entertainment in dumb show; a musical 109 composition with or without words; a cinematographic work to which are 110 assimilated works expressed by a process analogous to cinematography; 111 a work of drawing, painting, architecture, sculpture, engraving or 112 lithography; a photographic work to which are assimilated works 113 expressed by a process analogous to photography; a work of applied 114 art; an illustration, map, plan, sketch or three-dimensional work 115 relative to geography, topography, architecture or science; a 116 performance; a broadcast; a phonogram; a compilation of data to the 117 extent it is protected as a copyrightable work; or a work performed by 118 a variety or circus performer to the extent it is not otherwise 119 considered a literary or artistic work. 120 g. "You" means an individual or entity exercising rights under this 121 License who has not previously violated the terms of this License with 122 respect to the Work, or who has received express permission from the 123 Licensor to exercise rights under this License despite a previous 124 violation. 125 h. "Publicly Perform" means to perform public recitations of the Work and 126 to communicate to the public those public recitations, by any means or 127 process, including by wire or wireless means or public digital 128 performances; to make available to the public Works in such a way that 129 members of the public may access these Works from a place and at a 130 place individually chosen by them; to perform the Work to the public 131 by any means or process and the communication to the public of the 132 performances of the Work, including by public digital performance; to 133 broadcast and rebroadcast the Work by any means including signs, 134 sounds or images. 135 i. "Reproduce" means to make copies of the Work by any means including 136 without limitation by sound or visual recordings and the right of 137 fixation and reproducing fixations of the Work, including storage of a 138 protected performance or phonogram in digital form or other electronic 139 medium. 140 1412. Fair Dealing Rights. Nothing in this License is intended to reduce, 142limit, or restrict any uses free from copyright or rights arising from 143limitations or exceptions that are provided for in connection with the 144copyright protection under copyright law or other applicable laws. 145 1463. License Grant. Subject to the terms and conditions of this License, 147Licensor hereby grants You a worldwide, royalty-free, non-exclusive, 148perpetual (for the duration of the applicable copyright) license to 149exercise the rights in the Work as stated below: 150 151 a. to Reproduce the Work, to incorporate the Work into one or more 152 Collections, and to Reproduce the Work as incorporated in the 153 Collections; 154 b. to create and Reproduce Adaptations provided that any such Adaptation, 155 including any translation in any medium, takes reasonable steps to 156 clearly label, demarcate or otherwise identify that changes were made 157 to the original Work. For example, a translation could be marked "The 158 original work was translated from English to Spanish," or a 159 modification could indicate "The original work has been modified."; 160 c. to Distribute and Publicly Perform the Work including as incorporated 161 in Collections; and, 162 d. to Distribute and Publicly Perform Adaptations. 163 e. For the avoidance of doubt: 164 165 i. Non-waivable Compulsory License Schemes. In those jurisdictions in 166 which the right to collect royalties through any statutory or 167 compulsory licensing scheme cannot be waived, the Licensor 168 reserves the exclusive right to collect such royalties for any 169 exercise by You of the rights granted under this License; 170 ii. Waivable Compulsory License Schemes. In those jurisdictions in 171 which the right to collect royalties through any statutory or 172 compulsory licensing scheme can be waived, the Licensor waives the 173 exclusive right to collect such royalties for any exercise by You 174 of the rights granted under this License; and, 175 iii. Voluntary License Schemes. The Licensor waives the right to 176 collect royalties, whether individually or, in the event that the 177 Licensor is a member of a collecting society that administers 178 voluntary licensing schemes, via that society, from any exercise 179 by You of the rights granted under this License. 180 181The above rights may be exercised in all media and formats whether now 182known or hereafter devised. The above rights include the right to make 183such modifications as are technically necessary to exercise the rights in 184other media and formats. Subject to Section 8(f), all rights not expressly 185granted by Licensor are hereby reserved. 186 1874. Restrictions. The license granted in Section 3 above is expressly made 188subject to and limited by the following restrictions: 189 190 a. You may Distribute or Publicly Perform the Work only under the terms 191 of this License. You must include a copy of, or the Uniform Resource 192 Identifier (URI) for, this License with every copy of the Work You 193 Distribute or Publicly Perform. You may not offer or impose any terms 194 on the Work that restrict the terms of this License or the ability of 195 the recipient of the Work to exercise the rights granted to that 196 recipient under the terms of the License. You may not sublicense the 197 Work. You must keep intact all notices that refer to this License and 198 to the disclaimer of warranties with every copy of the Work You 199 Distribute or Publicly Perform. When You Distribute or Publicly 200 Perform the Work, You may not impose any effective technological 201 measures on the Work that restrict the ability of a recipient of the 202 Work from You to exercise the rights granted to that recipient under 203 the terms of the License. This Section 4(a) applies to the Work as 204 incorporated in a Collection, but this does not require the Collection 205 apart from the Work itself to be made subject to the terms of this 206 License. If You create a Collection, upon notice from any Licensor You 207 must, to the extent practicable, remove from the Collection any credit 208 as required by Section 4(b), as requested. If You create an 209 Adaptation, upon notice from any Licensor You must, to the extent 210 practicable, remove from the Adaptation any credit as required by 211 Section 4(b), as requested. 212 b. If You Distribute, or Publicly Perform the Work or any Adaptations or 213 Collections, You must, unless a request has been made pursuant to 214 Section 4(a), keep intact all copyright notices for the Work and 215 provide, reasonable to the medium or means You are utilizing: (i) the 216 name of the Original Author (or pseudonym, if applicable) if supplied, 217 and/or if the Original Author and/or Licensor designate another party 218 or parties (e.g., a sponsor institute, publishing entity, journal) for 219 attribution ("Attribution Parties") in Licensor's copyright notice, 220 terms of service or by other reasonable means, the name of such party 221 or parties; (ii) the title of the Work if supplied; (iii) to the 222 extent reasonably practicable, the URI, if any, that Licensor 223 specifies to be associated with the Work, unless such URI does not 224 refer to the copyright notice or licensing information for the Work; 225 and (iv) , consistent with Section 3(b), in the case of an Adaptation, 226 a credit identifying the use of the Work in the Adaptation (e.g., 227 "French translation of the Work by Original Author," or "Screenplay 228 based on original Work by Original Author"). The credit required by 229 this Section 4 (b) may be implemented in any reasonable manner; 230 provided, however, that in the case of a Adaptation or Collection, at 231 a minimum such credit will appear, if a credit for all contributing 232 authors of the Adaptation or Collection appears, then as part of these 233 credits and in a manner at least as prominent as the credits for the 234 other contributing authors. For the avoidance of doubt, You may only 235 use the credit required by this Section for the purpose of attribution 236 in the manner set out above and, by exercising Your rights under this 237 License, You may not implicitly or explicitly assert or imply any 238 connection with, sponsorship or endorsement by the Original Author, 239 Licensor and/or Attribution Parties, as appropriate, of You or Your 240 use of the Work, without the separate, express prior written 241 permission of the Original Author, Licensor and/or Attribution 242 Parties. 243 c. Except as otherwise agreed in writing by the Licensor or as may be 244 otherwise permitted by applicable law, if You Reproduce, Distribute or 245 Publicly Perform the Work either by itself or as part of any 246 Adaptations or Collections, You must not distort, mutilate, modify or 247 take other derogatory action in relation to the Work which would be 248 prejudicial to the Original Author's honor or reputation. Licensor 249 agrees that in those jurisdictions (e.g. Japan), in which any exercise 250 of the right granted in Section 3(b) of this License (the right to 251 make Adaptations) would be deemed to be a distortion, mutilation, 252 modification or other derogatory action prejudicial to the Original 253 Author's honor and reputation, the Licensor will waive or not assert, 254 as appropriate, this Section, to the fullest extent permitted by the 255 applicable national law, to enable You to reasonably exercise Your 256 right under Section 3(b) of this License (right to make Adaptations) 257 but not otherwise. 258 2595. Representations, Warranties and Disclaimer 260 261UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR 262OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY 263KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, 264INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, 265FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF 266LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, 267WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION 268OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. 269 2706. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE 271LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR 272ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES 273ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS 274BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 275 2767. Termination 277 278 a. This License and the rights granted hereunder will terminate 279 automatically upon any breach by You of the terms of this License. 280 Individuals or entities who have received Adaptations or Collections 281 from You under this License, however, will not have their licenses 282 terminated provided such individuals or entities remain in full 283 compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will 284 survive any termination of this License. 285 b. Subject to the above terms and conditions, the license granted here is 286 perpetual (for the duration of the applicable copyright in the Work). 287 Notwithstanding the above, Licensor reserves the right to release the 288 Work under different license terms or to stop distributing the Work at 289 any time; provided, however that any such election will not serve to 290 withdraw this License (or any other license that has been, or is 291 required to be, granted under the terms of this License), and this 292 License will continue in full force and effect unless terminated as 293 stated above. 294 2958. Miscellaneous 296 297 a. Each time You Distribute or Publicly Perform the Work or a Collection, 298 the Licensor offers to the recipient a license to the Work on the same 299 terms and conditions as the license granted to You under this License. 300 b. Each time You Distribute or Publicly Perform an Adaptation, Licensor 301 offers to the recipient a license to the original Work on the same 302 terms and conditions as the license granted to You under this License. 303 c. If any provision of this License is invalid or unenforceable under 304 applicable law, it shall not affect the validity or enforceability of 305 the remainder of the terms of this License, and without further action 306 by the parties to this agreement, such provision shall be reformed to 307 the minimum extent necessary to make such provision valid and 308 enforceable. 309 d. No term or provision of this License shall be deemed waived and no 310 breach consented to unless such waiver or consent shall be in writing 311 and signed by the party to be charged with such waiver or consent. 312 e. This License constitutes the entire agreement between the parties with 313 respect to the Work licensed here. There are no understandings, 314 agreements or representations with respect to the Work not specified 315 here. Licensor shall not be bound by any additional provisions that 316 may appear in any communication from You. This License may not be 317 modified without the mutual written agreement of the Licensor and You. 318 f. The rights granted under, and the subject matter referenced, in this 319 License were drafted utilizing the terminology of the Berne Convention 320 for the Protection of Literary and Artistic Works (as amended on 321 September 28, 1979), the Rome Convention of 1961, the WIPO Copyright 322 Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 323 and the Universal Copyright Convention (as revised on July 24, 1971). 324 These rights and subject matter take effect in the relevant 325 jurisdiction in which the License terms are sought to be enforced 326 according to the corresponding provisions of the implementation of 327 those treaty provisions in the applicable national law. If the 328 standard suite of rights granted under applicable copyright law 329 includes additional rights not granted under this License, such 330 additional rights are deemed to be included in the License; this 331 License is not intended to restrict the license of any rights under 332 applicable law. 333 334 335Creative Commons Notice 336 337 Creative Commons is not a party to this License, and makes no warranty 338 whatsoever in connection with the Work. Creative Commons will not be 339 liable to You or any party on any legal theory for any damages 340 whatsoever, including without limitation any general, special, 341 incidental or consequential damages arising in connection to this 342 license. Notwithstanding the foregoing two (2) sentences, if Creative 343 Commons has expressly identified itself as the Licensor hereunder, it 344 shall have all rights and obligations of Licensor. 345 346 Except for the limited purpose of indicating to the public that the 347 Work is licensed under the CCPL, Creative Commons does not authorize 348 the use by either party of the trademark "Creative Commons" or any 349 related trademark or logo of Creative Commons without the prior 350 written consent of Creative Commons. Any permitted use will be in 351 compliance with Creative Commons' then-current trademark usage 352 guidelines, as may be published on its website or otherwise made 353 available upon request from time to time. For the avoidance of doubt, 354 this trademark restriction does not form part of this License. 355 356 Creative Commons may be contacted at https://creativecommons.org/. 357 358=============================================================================== 359 360The Go Programming Language 361https://golang.org/LICENSE 362 363Copyright (c) 2009 The Go Authors. All rights reserved. 364 365Redistribution and use in source and binary forms, with or without 366modification, are permitted provided that the following conditions are 367met: 368 369 * Redistributions of source code must retain the above copyright 370notice, this list of conditions and the following disclaimer. 371 * Redistributions in binary form must reproduce the above 372copyright notice, this list of conditions and the following disclaimer 373in the documentation and/or other materials provided with the 374distribution. 375 * Neither the name of Google Inc. nor the names of its 376contributors may be used to endorse or promote products derived from 377this software without specific prior written permission. 378 379THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 380"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 381LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 382A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 383OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 384SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 385LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 386DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 387THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 388(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 389OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 390 391=============================================================================== 392 393The Rust Programming Language 394https://github.com/rust-lang/rust/blob/master/LICENSE-MIT 395 396Permission is hereby granted, free of charge, to any 397person obtaining a copy of this software and associated 398documentation files (the "Software"), to deal in the 399Software without restriction, including without 400limitation the rights to use, copy, modify, merge, 401publish, distribute, sublicense, and/or sell copies of 402the Software, and to permit persons to whom the Software 403is furnished to do so, subject to the following 404conditions: 405 406The above copyright notice and this permission notice 407shall be included in all copies or substantial portions 408of the Software. 409 410THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 411ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 412TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 413PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 414SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 415CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 416OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 417IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 418DEALINGS IN THE SOFTWARE. 419 420=============================================================================== 421 422The Rust Programming Language 423https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE 424 425 Apache License 426 Version 2.0, January 2004 427 http://www.apache.org/licenses/ 428 429TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 430 4311. Definitions. 432 433 "License" shall mean the terms and conditions for use, reproduction, 434 and distribution as defined by Sections 1 through 9 of this document. 435 436 "Licensor" shall mean the copyright owner or entity authorized by 437 the copyright owner that is granting the License. 438 439 "Legal Entity" shall mean the union of the acting entity and all 440 other entities that control, are controlled by, or are under common 441 control with that entity. For the purposes of this definition, 442 "control" means (i) the power, direct or indirect, to cause the 443 direction or management of such entity, whether by contract or 444 otherwise, or (ii) ownership of fifty percent (50%) or more of the 445 outstanding shares, or (iii) beneficial ownership of such entity. 446 447 "You" (or "Your") shall mean an individual or Legal Entity 448 exercising permissions granted by this License. 449 450 "Source" form shall mean the preferred form for making modifications, 451 including but not limited to software source code, documentation 452 source, and configuration files. 453 454 "Object" form shall mean any form resulting from mechanical 455 transformation or translation of a Source form, including but 456 not limited to compiled object code, generated documentation, 457 and conversions to other media types. 458 459 "Work" shall mean the work of authorship, whether in Source or 460 Object form, made available under the License, as indicated by a 461 copyright notice that is included in or attached to the work 462 (an example is provided in the Appendix below). 463 464 "Derivative Works" shall mean any work, whether in Source or Object 465 form, that is based on (or derived from) the Work and for which the 466 editorial revisions, annotations, elaborations, or other modifications 467 represent, as a whole, an original work of authorship. For the purposes 468 of this License, Derivative Works shall not include works that remain 469 separable from, or merely link (or bind by name) to the interfaces of, 470 the Work and Derivative Works thereof. 471 472 "Contribution" shall mean any work of authorship, including 473 the original version of the Work and any modifications or additions 474 to that Work or Derivative Works thereof, that is intentionally 475 submitted to Licensor for inclusion in the Work by the copyright owner 476 or by an individual or Legal Entity authorized to submit on behalf of 477 the copyright owner. For the purposes of this definition, "submitted" 478 means any form of electronic, verbal, or written communication sent 479 to the Licensor or its representatives, including but not limited to 480 communication on electronic mailing lists, source code control systems, 481 and issue tracking systems that are managed by, or on behalf of, the 482 Licensor for the purpose of discussing and improving the Work, but 483 excluding communication that is conspicuously marked or otherwise 484 designated in writing by the copyright owner as "Not a Contribution." 485 486 "Contributor" shall mean Licensor and any individual or Legal Entity 487 on behalf of whom a Contribution has been received by Licensor and 488 subsequently incorporated within the Work. 489 4902. Grant of Copyright License. Subject to the terms and conditions of 491 this License, each Contributor hereby grants to You a perpetual, 492 worldwide, non-exclusive, no-charge, royalty-free, irrevocable 493 copyright license to reproduce, prepare Derivative Works of, 494 publicly display, publicly perform, sublicense, and distribute the 495 Work and such Derivative Works in Source or Object form. 496 4973. Grant of Patent License. Subject to the terms and conditions of 498 this License, each Contributor hereby grants to You a perpetual, 499 worldwide, non-exclusive, no-charge, royalty-free, irrevocable 500 (except as stated in this section) patent license to make, have made, 501 use, offer to sell, sell, import, and otherwise transfer the Work, 502 where such license applies only to those patent claims licensable 503 by such Contributor that are necessarily infringed by their 504 Contribution(s) alone or by combination of their Contribution(s) 505 with the Work to which such Contribution(s) was submitted. If You 506 institute patent litigation against any entity (including a 507 cross-claim or counterclaim in a lawsuit) alleging that the Work 508 or a Contribution incorporated within the Work constitutes direct 509 or contributory patent infringement, then any patent licenses 510 granted to You under this License for that Work shall terminate 511 as of the date such litigation is filed. 512 5134. Redistribution. You may reproduce and distribute copies of the 514 Work or Derivative Works thereof in any medium, with or without 515 modifications, and in Source or Object form, provided that You 516 meet the following conditions: 517 518 (a) You must give any other recipients of the Work or 519 Derivative Works a copy of this License; and 520 521 (b) You must cause any modified files to carry prominent notices 522 stating that You changed the files; and 523 524 (c) You must retain, in the Source form of any Derivative Works 525 that You distribute, all copyright, patent, trademark, and 526 attribution notices from the Source form of the Work, 527 excluding those notices that do not pertain to any part of 528 the Derivative Works; and 529 530 (d) If the Work includes a "NOTICE" text file as part of its 531 distribution, then any Derivative Works that You distribute must 532 include a readable copy of the attribution notices contained 533 within such NOTICE file, excluding those notices that do not 534 pertain to any part of the Derivative Works, in at least one 535 of the following places: within a NOTICE text file distributed 536 as part of the Derivative Works; within the Source form or 537 documentation, if provided along with the Derivative Works; or, 538 within a display generated by the Derivative Works, if and 539 wherever such third-party notices normally appear. The contents 540 of the NOTICE file are for informational purposes only and 541 do not modify the License. You may add Your own attribution 542 notices within Derivative Works that You distribute, alongside 543 or as an addendum to the NOTICE text from the Work, provided 544 that such additional attribution notices cannot be construed 545 as modifying the License. 546 547 You may add Your own copyright statement to Your modifications and 548 may provide additional or different license terms and conditions 549 for use, reproduction, or distribution of Your modifications, or 550 for any such Derivative Works as a whole, provided Your use, 551 reproduction, and distribution of the Work otherwise complies with 552 the conditions stated in this License. 553 5545. Submission of Contributions. Unless You explicitly state otherwise, 555 any Contribution intentionally submitted for inclusion in the Work 556 by You to the Licensor shall be under the terms and conditions of 557 this License, without any additional terms or conditions. 558 Notwithstanding the above, nothing herein shall supersede or modify 559 the terms of any separate license agreement you may have executed 560 with Licensor regarding such Contributions. 561 5626. Trademarks. This License does not grant permission to use the trade 563 names, trademarks, service marks, or product names of the Licensor, 564 except as required for reasonable and customary use in describing the 565 origin of the Work and reproducing the content of the NOTICE file. 566 5677. Disclaimer of Warranty. Unless required by applicable law or 568 agreed to in writing, Licensor provides the Work (and each 569 Contributor provides its Contributions) on an "AS IS" BASIS, 570 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 571 implied, including, without limitation, any warranties or conditions 572 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 573 PARTICULAR PURPOSE. You are solely responsible for determining the 574 appropriateness of using or redistributing the Work and assume any 575 risks associated with Your exercise of permissions under this License. 576 5778. Limitation of Liability. In no event and under no legal theory, 578 whether in tort (including negligence), contract, or otherwise, 579 unless required by applicable law (such as deliberate and grossly 580 negligent acts) or agreed to in writing, shall any Contributor be 581 liable to You for damages, including any direct, indirect, special, 582 incidental, or consequential damages of any character arising as a 583 result of this License or out of the use or inability to use the 584 Work (including but not limited to damages for loss of goodwill, 585 work stoppage, computer failure or malfunction, or any and all 586 other commercial damages or losses), even if such Contributor 587 has been advised of the possibility of such damages. 588 5899. Accepting Warranty or Additional Liability. While redistributing 590 the Work or Derivative Works thereof, You may choose to offer, 591 and charge a fee for, acceptance of support, warranty, indemnity, 592 or other liability obligations and/or rights consistent with this 593 License. However, in accepting such obligations, You may act only 594 on Your own behalf and on Your sole responsibility, not on behalf 595 of any other Contributor, and only if You agree to indemnify, 596 defend, and hold each Contributor harmless for any liability 597 incurred by, or claims asserted against, such Contributor by reason 598 of your accepting any such warranty or additional liability. 599 600END OF TERMS AND CONDITIONS 601 602APPENDIX: How to apply the Apache License to your work. 603 604 To apply the Apache License to your work, attach the following 605 boilerplate notice, with the fields enclosed by brackets "[]" 606 replaced with your own identifying information. (Don't include 607 the brackets!) The text should be enclosed in the appropriate 608 comment syntax for the file format. We also recommend that a 609 file or class name and description of purpose be included on the 610 same "printed page" as the copyright notice for easier 611 identification within third-party archives. 612 613Copyright [yyyy] [name of copyright owner] 614 615Licensed under the Apache License, Version 2.0 (the "License"); 616you may not use this file except in compliance with the License. 617You may obtain a copy of the License at 618 619 http://www.apache.org/licenses/LICENSE-2.0 620 621Unless required by applicable law or agreed to in writing, software 622distributed under the License is distributed on an "AS IS" BASIS, 623WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 624See the License for the specific language governing permissions and 625limitations under the License. 626