[
  {
    "path": ".gitignore",
    "content": "*.py[cod]\n\n# C extensions\n*.so\n\n# Packages\n*.egg\n*.egg-info\ndist\nbuild\neggs\nparts\nbin\nvar\nsdist\ndevelop-eggs\n.installed.cfg\nlib64\n__pycache__\n\n# Installer logs\npip-log.txt\n\n# Unit test / coverage reports\n.coverage\n.tox\nnosetests.xml\n\n# Translations\n*.mo\n\n# Mr Developer\n.mr.developer.cfg\n.project\n.pydevproject\n"
  },
  {
    "path": "LICENSE",
    "content": "Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "README.md",
    "content": "sed_and_awk\n===========\n\nAn online presentation for sed &amp; awk. You can see [http://dongweiming.github.io/sed_and_awk](http://dongweiming.github.io/sed_and_awk)\n\nHow to use\n--------\n\n* For site.\n\nYou can start a web app with [Flask](https://github.com/mitsuhiko/flask), You can install following this:\n\n```\nsudo pip install -r requirements.txt\n```\n\nor\n\n```\nsudo easy_install flask\n```\n\nthen\n\n```\nsudo python run.py\n```\n\n* For html.\n\nIf you want direct use browser open it. for example\non  osx.\n\n\n```\nopen index.html\n```\n"
  },
  {
    "path": "code/answer_awk.txt",
    "content": "1. netstat -nat |grep 27018|awk '{print $5}'|awk -F ':' '{a[$1]++} END {for (j in a) print a[j], j}'\n2. awk '{a[sprintf(\"%s %s\", substr($4,2,14),$1)]++} END{for(i in a){print \"ip: \" i,\"count: \" a[i]}}' access.log |sort -rnk 5\n3. awk '/Addy/{ P=1; next } /Mattt/ {exit} P' question_awk3.txt\n4. awk '!a[$1]++' question_awk4.txt\n5. awk '{a[$1]=$2}NR>FNR{print $1,a[$1], a[$2]}'  question_awk5_2.txt question_awk5_1.txt\n6. awk 'NR == FNR{a[$0]} !($0 in a)'  question_awk6_2.txt question_awk6_1.txt\n"
  },
  {
    "path": "code/answer_sed.txt",
    "content": "1. echo \"This is 123\"|sed \"s/[0-9]\\{3\\}/[&]/\"\n2. 打印匹配2和她后面的2行\n3. 把匹配2的行改成4\n4. echo \"This is UPPER\"|/usr/local/bin/sed \"s/\\(.*\\) \\(.*\\) \\(.*\\)/\\U\\2,\\E\\u\\1,\\E\\L\\3/\"\n5. 把前面的哪行叠加到本行\n6. sed -n '1!G;h;$p'\n"
  },
  {
    "path": "code/arguments.awk",
    "content": "BEGIN {\n    print \"ARGC=\",ARGC\n    for (i = 0; i < ARGC; i++)\n  print ARGV[i]\n}\n"
  },
  {
    "path": "code/array-for-loop.awk",
    "content": "BEGIN {\n    item[101]=\"Github\";\n    item[21]=\"Google\";\n    for (x in item)\n        print item[x];\n}\n"
  },
  {
    "path": "code/asort.awk",
    "content": "BEGIN {\n item[101]=\"Github\";\n item[22]=\"Whim\";\n item[50]=\"Google\";\n print \"------Before asort------\"\n for (x in item)\n     print \"Index\",x,\"contains\",item[x];\n total = asort(item);\n print \"------After asort------\"\n for (x in item)\n     print \"Index\",x,\"contains\",item[x];\n print \"Return value from asort:\", total;\n}\n"
  },
  {
    "path": "code/asorti.awk",
    "content": "BEGIN {\n item[101]=\"Github\";\n item[22]=\"Whim\";\n item[50]=\"Google\";\n print \"----- Function: asort -----\"\n total = asort(item,itemdesc);\n for (i=1; i<= total; i++)\n    print \"Index\",i,\"contains\",itemdesc[i];\n print \"----- Function: asorti -----\"\n total = asorti(item,itemabbr);\n for (i=1; i<= total; i++)\n     print \"Index\",i,\"contains\",itemabbr[i];\n}\n"
  },
  {
    "path": "code/bits.awk",
    "content": "BEGIN {\n number1=15\n number2=25\n print \"AND: \" and(number1,number2);\n print \"OR: \" or(number1,number2)\n print \"XOR: \" xor(number1,number2)\n print \"LSHIFT: \" lshift(number1,2)\n print \"RSHIFT: \" rshift(number1,2)\n}\n"
  },
  {
    "path": "code/dowhile.awk",
    "content": "{\n    i=2; total=0;\n do\n {\n     total = total + $i;\n     i++;\n } while (i <= NF)\n print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n"
  },
  {
    "path": "code/environ.awk",
    "content": "BEGIN {\n OFS=\"=\"\n for(x in ENVIRON)\n     print x,ENVIRON[x];\n}\n"
  },
  {
    "path": "code/files.txt",
    "content": "/etc/passwd\n/etc/group\n"
  },
  {
    "path": "code/for.awk",
    "content": "{\n    total=0;\n    for (i=2; i <= NF; i++)\n        total = total + $i;\n    print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n"
  },
  {
    "path": "code/function-debug.awk",
    "content": "function mydebug (message) {\n    print (\"Debug Time:\" strftime(\"%a %b %d %H:%M:%S %Z %Y\", systime()))\n    print (message)\n}\n{\n    mydebug($NF)\n}\n"
  },
  {
    "path": "code/items-sold.txt",
    "content": "101 2 10 5 8 10 12\n102 0 1 4 3 0 2\n103 10 6 11 20 5 13\n104 2 3 4 0 6 5\n105 10 2 5 7 12 6\n"
  },
  {
    "path": "code/items.txt",
    "content": "101,HD Camcorder,Video,210,10\n102,Refrigerator,Appliance,850,2\n103,MP3 Player,Audio,270,15\n104,Tennis Racket,Sports,190,20\n105,Laser Printer,Office,475,5\n"
  },
  {
    "path": "code/label.sed",
    "content": "#!/usr/local/bin/sed -nf\nh;n;H;x\ns/\\n/:/\n/Github/!b end\ns/^/*/\n:end p"
  },
  {
    "path": "code/numbers.txt",
    "content": "1\n12\n123\n1234\n12345\n123456\n"
  },
  {
    "path": "code/path.txt",
    "content": "reading /usr/local/bin directory\n"
  },
  {
    "path": "code/printf-width.awk",
    "content": "BEGIN {\nFS=\",\"\nprintf \"%3s\\t%10s\\t%10s\\t%5s\\t%3s\\n\",\n    \"Num\",\"Description\",\"Type\",\"Price\",\"Qty\"\nprintf \"-----------------------------------------------------\\n\"\n}\n{\n    printf \"%3d\\t%10s\\t%10s\\t%g\\t%d\\n\", $1,$2,$3,$4,$5\n}\n"
  },
  {
    "path": "code/question_awk.txt",
    "content": "1 2 3 4\n5 6 7 8\n9 10 11 12\n1 3 5 7\n2 4 6 8\n"
  },
  {
    "path": "code/question_awk3.txt",
    "content": "Ian Bicking\nHakim El Hattab\nPaul Irish\nAddy Osmani\nChris Wanstrath\nMattt Thompson\nAsk Solem Hoel\n"
  },
  {
    "path": "code/question_awk4.txt",
    "content": "1\n22\n133\n12\n22\n1\n"
  },
  {
    "path": "code/question_awk5_1.txt",
    "content": "101 Addy\n102 Mattt\n103 Ask\n"
  },
  {
    "path": "code/question_awk5_2.txt",
    "content": "Ask 1024\nMattt 2570\nAddy 578\n"
  },
  {
    "path": "code/question_awk6_1.txt",
    "content": "123\n1\n11\n1254\n"
  },
  {
    "path": "code/question_awk6_2.txt",
    "content": "123\n12\n1234\n1\n1232\n"
  },
  {
    "path": "code/question_awk7.txt",
    "content": "101,/etc/passwd\n102,/etc/group\n"
  },
  {
    "path": "code/sed_example_1.sed",
    "content": "/^root/ p\n/^nobody/ p"
  },
  {
    "path": "code/source-multiple-fs.txt",
    "content": "101,Ian Bicking:Mozilla%\n102,Hakim El Hattab:Whim%\n103,Paul Irish:Google%\n104,Addy Osmani:Google%\n105,Chris Wanstrath:Github%\n106,Mattt Thompson:Heroku%\n107,Ask Solem Hoel:VMware%\n"
  },
  {
    "path": "code/source-one-line.txt",
    "content": "1,one:2,two:3,three:4,four\n"
  },
  {
    "path": "code/source-star.txt",
    "content": "101,Ian Bicking,Mozilla,1204\n102,Hakim El Hattab,Whim,4029\n103,Paul Irish,Google,7200\n104,Addy Osmani,Google,2201\n105,Chris Wanstrath,Github,1002\n106,Mattt Thompson,Heroku,890\n107,Ask Solem Hoel,VMware,2109\n"
  },
  {
    "path": "code/source.txt",
    "content": "101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n"
  },
  {
    "path": "code/source2.txt",
    "content": "Ian Bicking\nMozilla\nHakim El Hattab\nWhim\nPaul Irish\nGoogle\nChris Wanstrath\nGithub\nMattt Thompson\nHeroku\n"
  },
  {
    "path": "code/srand.awk",
    "content": "BEGIN {\n    srand(5);\n    count=0;\n    max=30;\n    while (count < 5) {\n        # 随机数范围为5-30\n        rnd = int(rand() * max);\n        print rnd;\n        count++;\n    }\n}\n"
  },
  {
    "path": "code/string.awk",
    "content": "BEGIN {\n    FS=\",\";\n    OFS=\",\";\n    string1=\"GO\";\n    string2=\"OGLE\";\n    numberstring=\"100\";\n    string3=string1 string2;\n    print \"Concatenate string is:\" string3;\n    numberstring=numberstring+1;\n    print \"String to number:\" numberstring;\n}\n"
  },
  {
    "path": "code/testscript.sed",
    "content": "#!/usr/bin/sed -nf\n/root/ p\n/nobody/ p"
  },
  {
    "path": "code/total-star.awk",
    "content": "BEGIN {\n    FS=\",\";\n    total=0; }\n{\n print $2 \"'s star is: \" $4;\n total=total+$4\n} END {\n    print \"---\\nTotal star = $\"total;\n}\n"
  },
  {
    "path": "code/while.awk",
    "content": "{\n    i=2; total=0;\n    while (i <= NF) {\n        total = total + $i;\n        i++;\n }\n    print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n"
  },
  {
    "path": "css/print/paper.css",
    "content": "/* Default Print Stylesheet Template\n   by Rob Glazebrook of CSSnewbie.com\n   Last Updated: June 4, 2008\n\n   Feel free (nay, compelled) to edit, append, and \n   manipulate this file as you see fit. */\n\n\n/* SECTION 1: Set default width, margin, float, and\n   background. This prevents elements from extending \n   beyond the edge of the printed page, and prevents\n   unnecessary background images from printing */\nbody {\n\tbackground: #fff;\n\tfont-size: 13pt;\n\twidth: auto;\n\theight: auto;\n\tborder: 0;\n\tmargin: 0 5%;\n\tpadding: 0;\n\tfloat: none !important;\n\toverflow: visible;\n}\nhtml {\n\tbackground: #fff;\n\twidth: auto;\n\theight: auto;\n\toverflow: visible;\n}\n\n/* SECTION 2: Remove any elements not needed in print. \n   This would include navigation, ads, sidebars, etc. */\n.nestedarrow, \n.controls, \n.reveal .progress, \n.reveal.overview,\n.fork-reveal,\n.share-reveal,\n.state-background {\n\tdisplay: none !important;\n}\n\n/* SECTION 3: Set body font face, size, and color.\n   Consider using a serif font for readability. */\nbody, p, td, li, div, a {\n\tfont-size: 16pt!important;\n\tfont-family: Georgia, \"Times New Roman\", Times, serif !important;\n\tcolor: #000; \n}\n\n/* SECTION 4: Set heading font face, sizes, and color.\n   Diffrentiate your headings from your body text.\n   Perhaps use a large sans-serif for distinction. */\nh1,h2,h3,h4,h5,h6 {\n\tcolor: #000!important;\n\theight: auto;\n\tline-height: normal;\n\tfont-family: Georgia, \"Times New Roman\", Times, serif !important;\n\ttext-shadow: 0 0 0 #000 !important;\n\ttext-align: left;\n\tletter-spacing: normal;\n}\n/* Need to reduce the size of the fonts for printing */\nh1 { font-size: 26pt !important;  }\nh2 { font-size: 22pt !important; }\nh3 { font-size: 20pt !important; }\nh4 { font-size: 20pt !important; font-variant: small-caps; }\nh5 { font-size: 19pt !important; }\nh6 { font-size: 18pt !important; font-style: italic; }\n\n/* SECTION 5: Make hyperlinks more usable.\n   Ensure links are underlined, and consider appending\n   the URL to the end of the link for usability. */\na:link, \na:visited {\n\tcolor: #000 !important;\n\tfont-weight: bold;\n\ttext-decoration: underline;\n}\n/*\n.reveal a:link:after, \n.reveal a:visited:after {\n\tcontent: \" (\" attr(href) \") \";\n\tcolor: #222 !important;\n\tfont-size: 90%;\n}\n*/\n\n\n/* SECTION 6: more reveal.js specific additions by @skypanther */\nul, ol, div, p {\n\tvisibility: visible;\n\tposition: static;\n\twidth: auto;\n\theight: auto;\n\tdisplay: block;\n\toverflow: visible;\n\tmargin: auto;\n\ttext-align: left !important;\n}\n.reveal .slides {\n\tposition: static;\n\twidth: auto;\n\theight: auto;\n\n\tleft: auto;\n\ttop: auto;\n\tmargin-left: auto;\n\tmargin-top: auto;\n\tpadding: auto;\n\n\toverflow: visible;\n\tdisplay: block;\n\n\ttext-align: center;\n\t-webkit-perspective: none;\n\t   -moz-perspective: none;\n\t    -ms-perspective: none;\n\t        perspective: none;\n\n\t-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */\n\t   -moz-perspective-origin: 50% 50%;\n\t    -ms-perspective-origin: 50% 50%;\n\t        perspective-origin: 50% 50%;\n}\n.reveal .slides>section, \n.reveal .slides>section>section {\n\t\n\tvisibility: visible !important;\n\tposition: static !important;\n\twidth: 90% !important;\n\theight: auto !important;\n\tdisplay: block !important;\n\toverflow: visible !important;\n\n\tleft: 0% !important;\n\ttop: 0% !important;\n\tmargin-left: 0px !important;\n\tmargin-top: 0px !important;\n\tpadding: 20px 0px !important;\n\n\topacity: 1 !important;\n\n\t-webkit-transform-style: flat !important;\n\t   -moz-transform-style: flat !important;\n\t    -ms-transform-style: flat !important;\n\t        transform-style: flat !important;\n\n\t-webkit-transform: none !important;\n\t   -moz-transform: none !important;\n\t    -ms-transform: none !important;\n\t        transform: none !important;\n}\n.reveal section {\n\tpage-break-after: always !important; \n\tdisplay: block !important;\n}\n.reveal section .fragment {\n\topacity: 1 !important;\n\tvisibility: visible !important;\n\t\n\t-webkit-transform: none !important;\n\t   -moz-transform: none !important;\n\t    -ms-transform: none !important;\n\t        transform: none !important;\n}\n.reveal section:last-of-type {\n\tpage-break-after: avoid !important; \n}\n.reveal section img {\n\tdisplay: block;\n\tmargin: 15px 0px;\n\tbackground: rgba(255,255,255,1);\n\tborder: 1px solid #666;\n\tbox-shadow: none;\n}"
  },
  {
    "path": "css/print/pdf.css",
    "content": "/* Default Print Stylesheet Template\n   by Rob Glazebrook of CSSnewbie.com\n   Last Updated: June 4, 2008\n\n   Feel free (nay, compelled) to edit, append, and \n   manipulate this file as you see fit. */\n\n\n/* SECTION 1: Set default width, margin, float, and\n   background. This prevents elements from extending \n   beyond the edge of the printed page, and prevents\n   unnecessary background images from printing */\n* {\n\t-webkit-print-color-adjust: exact; \n}\n\nbody {\n\tfont-size: 18pt;\n\twidth: auto;\n\theight: auto;\n\tborder: 0;\n\tmargin: 0 5%;\n\tpadding: 0;\n\tfloat: none !important;\n\toverflow: visible;\n\tbackground-image: none !important;\n}\n\nhtml {\n\twidth: auto;\n\theight: auto;\n\toverflow: visible;\n}\n\n/* SECTION 2: Remove any elements not needed in print. \n   This would include navigation, ads, sidebars, etc. */\n.nestedarrow, \n.controls, \n.reveal .progress, \n.reveal.overview,\n.fork-reveal,\n.share-reveal,\n.state-background {\n\tdisplay: none !important;\n}\n\n/* SECTION 3: Set body font face, size, and color.\n   Consider using a serif font for readability. */\nbody, p, td, li, div {\n\tfont-size: 18pt;\n}\n\n/* SECTION 4: Set heading font face, sizes, and color.\n   Diffrentiate your headings from your body text.\n   Perhaps use a large sans-serif for distinction. */\nh1,h2,h3,h4,h5,h6 {\n\ttext-shadow: 0 0 0 #000 !important;\n}\n\n/* SECTION 5: Make hyperlinks more usable.\n   Ensure links are underlined, and consider appending\n   the URL to the end of the link for usability. */\na:link, \na:visited {\n\tfont-weight: bold;\n\ttext-decoration: underline;\n}\n\n\n/* SECTION 6: more reveal.js specific additions by @skypanther */\nul, ol, div, p {\n\tvisibility: visible;\n\tposition: static;\n\twidth: auto;\n\theight: auto;\n\tdisplay: block;\n\toverflow: visible;\n\tmargin: auto;\n}\n.reveal .slides {\n\tposition: static;\n\twidth: 100%;\n\theight: auto;\n\n\tleft: auto;\n\ttop: auto;\n\tmargin-left: auto;\n\tmargin-right: auto;\n\tmargin-top: auto;\n\tpadding: auto;\n\n\toverflow: visible;\n\tdisplay: block;\n\n\ttext-align: center;\n\n\t-webkit-perspective: none;\n\t   -moz-perspective: none;\n\t    -ms-perspective: none;\n\t        perspective: none;\n\n\t-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */\n\t   -moz-perspective-origin: 50% 50%;\n\t    -ms-perspective-origin: 50% 50%;\n\t        perspective-origin: 50% 50%;\n}\n.reveal .slides section {\n\n\tpage-break-after: always !important; \n\n\tvisibility: visible !important;\n\tposition: static !important;\n\twidth: 100% !important;\n\theight: auto !important;\n\tmin-height: initial !important;\n\tdisplay: block !important;\n\toverflow: visible !important;\n\n\tleft: 0 !important;\n\ttop: 0 !important;\n\tmargin-left: 0px !important;\n\tmargin-top: 50px !important;\n\tpadding: 20px 0px !important;\n\n\topacity: 1 !important;\n\n\t-webkit-transform-style: flat !important;\n\t   -moz-transform-style: flat !important;\n\t    -ms-transform-style: flat !important;\n\t        transform-style: flat !important;\n\n\t-webkit-transform: none !important;\n\t   -moz-transform: none !important;\n\t    -ms-transform: none !important;\n\t        transform: none !important;\n}\n.reveal section.stack {\n\tmargin: 0px !important;\n\tpadding: 0px !important;\n\tpage-break-after: avoid !important; \n}\n.reveal section .fragment {\n\topacity: 1 !important;\n\tvisibility: visible !important;\n\t\n\t-webkit-transform: none !important;\n\t   -moz-transform: none !important;\n\t    -ms-transform: none !important;\n\t        transform: none !important;\n}\n.reveal img {\n\tbox-shadow: none;\n}\n.reveal .roll {\n\toverflow: visible;\n\tline-height: 1em;\n}\n.reveal small a {\n\tfont-size: 16pt !important;\n}\n"
  },
  {
    "path": "css/reveal.css",
    "content": "@charset \"UTF-8\";\n\n/*!\n * reveal.js\n * http://lab.hakim.se/reveal-js\n * MIT licensed\n *\n * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se\n */\n\n\n/*********************************************\n * RESET STYLES\n *********************************************/\n\nhtml, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal iframe,\n.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6, .reveal p, .reveal blockquote, .reveal pre,\n.reveal a, .reveal abbr, .reveal acronym, .reveal address, .reveal big, .reveal cite, .reveal code,\n.reveal del, .reveal dfn, .reveal em, .reveal img, .reveal ins, .reveal kbd, .reveal q, .reveal s, .reveal samp,\n.reveal small, .reveal strike, .reveal strong, .reveal sub, .reveal sup, .reveal tt, .reveal var,\n.reveal b, .reveal u, .reveal i, .reveal center,\n.reveal dl, .reveal dt, .reveal dd, .reveal ol, .reveal ul, .reveal li,\n.reveal fieldset, .reveal form, .reveal label, .reveal legend,\n.reveal table, .reveal caption, .reveal tbody, .reveal tfoot, .reveal thead, .reveal tr, .reveal th, .reveal td,\n.reveal article, .reveal aside, .reveal canvas, .reveal details, .reveal embed,\n.reveal figure, .reveal figcaption, .reveal footer, .reveal header, .reveal hgroup,\n.reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,\n.reveal time, .reveal mark, .reveal audio, video {\n  margin: 0;\n  padding: 0;\n  border: 0;\n  font-size: 100%;\n  font: inherit;\n  vertical-align: baseline;\n}\n\n.reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure,\n.reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section {\n  display: block;\n}\n\n\n/*********************************************\n * GLOBAL STYLES\n *********************************************/\n\nhtml,\nbody {\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n}\n\nbody {\n  position: relative;\n  line-height: 1;\n}\n\n::selection {\n  background: #FF5E99;\n  color: #fff;\n  text-shadow: none;\n}\n\n@media screen and (max-width: 900px), (max-height: 600px) {\n  .reveal .slides {\n    font-size: 0.82em;\n  }\n}\n\n@media screen and (max-width: 700px), (max-height: 400px) {\n  .reveal .slides {\n    font-size: 0.66em;\n  }\n}\n\n/*********************************************\n * HEADERS\n *********************************************/\n\n.reveal h1,\n.reveal h2,\n.reveal h3,\n.reveal h4,\n.reveal h5,\n.reveal h6 {\n  -webkit-hyphens: auto;\n     -moz-hyphens: auto;\n          hyphens: auto;\n\n  word-break: break-all;\n  word-break: break-word;\n}\n\n.reveal h1 { font-size: 3.77em; }\n.reveal h2 { font-size: 2.11em; }\n.reveal h3 { font-size: 1.55em; }\n.reveal h4 { font-size: 1em;  }\n\n\n/*********************************************\n * VIEW FRAGMENTS\n *********************************************/\n\n.reveal .slides section .fragment {\n  opacity: 0;\n\n  -webkit-transition: all .2s ease;\n     -moz-transition: all .2s ease;\n      -ms-transition: all .2s ease;\n       -o-transition: all .2s ease;\n          transition: all .2s ease;\n}\n  .reveal .slides section .fragment.visible {\n    opacity: 1;\n  }\n\n.reveal .slides section .fragment.grow {\n  opacity: 1;\n}\n  .reveal .slides section .fragment.grow.visible {\n    -webkit-transform: scale( 1.3 );\n       -moz-transform: scale( 1.3 );\n        -ms-transform: scale( 1.3 );\n         -o-transform: scale( 1.3 );\n            transform: scale( 1.3 );\n  }\n\n.reveal .slides section .fragment.shrink {\n  opacity: 1;\n}\n  .reveal .slides section .fragment.shrink.visible {\n    -webkit-transform: scale( 0.7 );\n       -moz-transform: scale( 0.7 );\n        -ms-transform: scale( 0.7 );\n         -o-transform: scale( 0.7 );\n            transform: scale( 0.7 );\n  }\n\n.reveal .slides section .fragment.roll-in {\n  opacity: 0;\n\n  -webkit-transform: rotateX( 90deg );\n     -moz-transform: rotateX( 90deg );\n      -ms-transform: rotateX( 90deg );\n       -o-transform: rotateX( 90deg );\n          transform: rotateX( 90deg );\n}\n  .reveal .slides section .fragment.roll-in.visible {\n    opacity: 1;\n\n    -webkit-transform: rotateX( 0 );\n       -moz-transform: rotateX( 0 );\n        -ms-transform: rotateX( 0 );\n         -o-transform: rotateX( 0 );\n            transform: rotateX( 0 );\n  }\n\n.reveal .slides section .fragment.fade-out {\n  opacity: 1;\n}\n  .reveal .slides section .fragment.fade-out.visible {\n    opacity: 0;\n  }\n\n.reveal .slides section .fragment.highlight-red,\n.reveal .slides section .fragment.highlight-green,\n.reveal .slides section .fragment.highlight-blue {\n  opacity: 1;\n}\n  .reveal .slides section .fragment.highlight-red.visible {\n    color: #ff2c2d\n  }\n  .reveal .slides section .fragment.highlight-green.visible {\n    color: #17ff2e;\n  }\n  .reveal .slides section .fragment.highlight-blue.visible {\n    color: #1b91ff;\n  }\n\n\n/*********************************************\n * DEFAULT ELEMENT STYLES\n *********************************************/\n\n/* Fixes issue in Chrome where italic fonts did not appear when printing to PDF */\n.reveal:after {\n  content: '';\n  font-style: italic;\n}\n\n/* Preserve aspect ratio and scale image so it's bound within the section */\n.reveal img,\n.reveal iframe {\n  max-width: 100%;\n  max-height: 100%;\n}\n\n.reveal strong,\n.reveal b {\n  font-weight: bold;\n}\n\n.reveal em,\n.reveal i {\n  font-style: italic;\n}\n\n.reveal ol,\n.reveal ul {\n  display: inline-block;\n\n  text-align: left;\n  margin: 0 0 0 1em;\n}\n\n.reveal ol {\n  list-style-type: decimal;\n}\n\n.reveal ul {\n  list-style-type: disc;\n}\n\n.reveal ul ul {\n  list-style-type: square;\n}\n\n.reveal ul ul ul {\n  list-style-type: circle;\n}\n\n.reveal ul ul,\n.reveal ul ol,\n.reveal ol ol,\n.reveal ol ul {\n  display: block;\n  margin-left: 40px;\n}\n\n.reveal .slides p {\n\tfont-size: 1.1em;\n}\n\n.reveal p {\n  margin-bottom: 10px;\n  line-height: 1.2em;\n}\n\n.reveal q,\n.reveal blockquote {\n  quotes: none;\n}\n\n.reveal blockquote {\n  display: block;\n  position: relative;\n  width: 70%;\n  margin: 5px auto;\n  padding: 5px;\n\n  font-style: italic;\n  background: rgba(255, 255, 255, 0.05);\n  box-shadow: 0px 0px 2px rgba(0,0,0,0.2);\n}\n  .reveal blockquote p:first-child,\n  .reveal blockquote p:last-child {\n    display: inline-block;\n  }\n  .reveal blockquote:before {\n    content: '\\201C';\n  }\n  .reveal blockquote:after {\n    content: '\\201D';\n  }\n\n.reveal q {\n  font-style: italic;\n}\n  .reveal q:before {\n    content: '\\201C';\n  }\n  .reveal q:after {\n    content: '\\201D';\n  }\n\n.reveal pre {\n  display: block;\n  position: relative;\n  width:110%;\n  margin: 15px auto;\n\n  text-align: left;\n  font-size: 0.9em;\n  font-family: monospace;\n  line-height: 1.2em;\n\n  word-wrap: break-word;\n\n  box-shadow: 0px 0px 6px rgba(0,0,0,0.3);\n}\n.reveal pre code {\n  padding: 5px;\n}\n\n.reveal code {\n  font-family: monospace;\n  overflow: auto;\n  max-height: 400px;\n}\n\n.reveal table th,\n.reveal table td {\n  text-align: left;\n  padding-right: .3em;\n}\n\n.reveal table th {\n  text-shadow: rgb(255,255,255) 1px 1px 2px;\n}\n\n.reveal sup {\n  vertical-align: super;\n}\n.reveal sub {\n  vertical-align: sub;\n}\n\n.reveal small {\n  display: inline-block;\n  font-size: 0.6em;\n  line-height: 1.2em;\n  vertical-align: top;\n}\n\n.reveal small * {\n  vertical-align: top;\n}\n\n\n/*********************************************\n * CONTROLS\n *********************************************/\n\n.reveal .controls {\n  display: none;\n  position: fixed;\n  width: 110px;\n  height: 110px;\n  z-index: 30;\n  right: 10px;\n  bottom: 10px;\n}\n\n.reveal .controls div {\n  position: absolute;\n  opacity: 0.1;\n  width: 0; \n  height: 0; \n  border: 12px solid transparent;\n\n  -webkit-transition: opacity 0.2s ease;\n     -moz-transition: opacity 0.2s ease;\n      -ms-transition: opacity 0.2s ease;\n       -o-transition: opacity 0.2s ease;\n          transition: opacity 0.2s ease;\n}\n\n.reveal .controls div.enabled {\n  opacity: 0.6;\n  cursor: pointer;\n}\n\n.reveal .controls div.enabled:active {\n  margin-top: 1px;\n}\n\n.reveal .controls div.navigate-left {\n  top: 42px;\n\n  border-right-width: 22px;\n  border-right-color: #eee;\n}\n\n.reveal .controls div.navigate-right {\n  left: 74px;\n  top: 42px;\n\n  border-left-width: 22px;\n  border-left-color: #eee;\n}\n\n.reveal .controls div.navigate-up {\n  left: 42px;\n\n  border-bottom-width: 22px;\n  border-bottom-color: #eee;\n}\n\n.reveal .controls div.navigate-down {\n  left: 42px;\n  top: 74px;\n\n  border-top-width: 22px;\n  border-top-color: #eee;\n}\n\n\n/*********************************************\n * PROGRESS BAR\n *********************************************/\n\n.reveal .progress {\n  position: fixed;\n  display: none;\n  height: 3px;\n  width: 100%;\n  bottom: 0;\n  left: 0;\n  z-index: 10;\n}\n  .reveal .progress:after {\n    content: '';\n    display: 'block';\n    position: absolute;\n    height: 20px;\n    width: 100%;\n    top: -20px;\n  }\n  .reveal .progress span {\n    display: block;\n    height: 100%;\n    width: 0px;\n\n    -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n       -moz-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n        -ms-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n         -o-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n            transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n  }\n\n\n/*********************************************\n * ROLLING LINKS\n *********************************************/\n\n.reveal .roll {\n  display: inline-block;\n  line-height: 1.2;\n  overflow: hidden;\n\n  vertical-align: top;\n\n  -webkit-perspective: 400px;\n     -moz-perspective: 400px;\n      -ms-perspective: 400px;\n          perspective: 400px;\n\n  -webkit-perspective-origin: 50% 50%;\n     -moz-perspective-origin: 50% 50%;\n      -ms-perspective-origin: 50% 50%;\n          perspective-origin: 50% 50%;\n}\n  .reveal .roll:hover {\n    background: none;\n    text-shadow: none;\n  }\n.reveal .roll span {\n  display: block;\n  position: relative;\n  padding: 0 2px;\n\n  pointer-events: none;\n\n  -webkit-transition: all 400ms ease;\n     -moz-transition: all 400ms ease;\n      -ms-transition: all 400ms ease;\n          transition: all 400ms ease;\n\n  -webkit-transform-origin: 50% 0%;\n     -moz-transform-origin: 50% 0%;\n      -ms-transform-origin: 50% 0%;\n          transform-origin: 50% 0%;\n\n  -webkit-transform-style: preserve-3d;\n     -moz-transform-style: preserve-3d;\n      -ms-transform-style: preserve-3d;\n          transform-style: preserve-3d;\n\n  -webkit-backface-visibility: hidden;\n     -moz-backface-visibility: hidden;\n          backface-visibility: hidden;\n}\n  .reveal .roll:hover span {\n      background: rgba(0,0,0,0.5);\n\n      -webkit-transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );\n         -moz-transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );\n          -ms-transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );\n              transform: translate3d( 0px, 0px, -45px ) rotateX( 90deg );\n  }\n.reveal .roll span:after {                                                     \n  content: attr(data-title);                                                   \n                                                                               \n  display: block;                                                              \n  position: absolute;                                                          \n  left: 0;                                                                     \n  top: 0;                                                                      \n  padding: 0 2px;                                                              \n                                                                               \n  -webkit-transform-origin: 50% 0%;                                            \n     -moz-transform-origin: 50% 0%;                                            \n      -ms-transform-origin: 50% 0%;                                            \n          transform-origin: 50% 0%;                                            \n                                                                               \n  -webkit-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg );          \n     -moz-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg );          \n      -ms-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg );          \n          transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg );          \n}  \n\n\n/*********************************************\n * SLIDES\n *********************************************/\n\n.reveal {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  min-height: 640px; /* min height + 40 to account for padding */\n}\n\n.reveal .slides {\n  position: absolute;\n  max-width: 900px;\n  min-height: 600px;\n  width: 80%;\n  left: 50%;\n  top: 50%;\n  \n  overflow: visible;\n  z-index: 1;\n  text-align: center;\n\n  -webkit-transition: -webkit-perspective .4s ease;\n     -moz-transition: -moz-perspective .4s ease;\n      -ms-transition: -ms-perspective .4s ease;\n       -o-transition: -o-perspective .4s ease;\n          transition: perspective .4s ease;\n\n  -webkit-perspective: 600px;\n     -moz-perspective: 600px;\n      -ms-perspective: 600px;\n          perspective: 600px;\n\n  -webkit-perspective-origin: 0px -100px;\n     -moz-perspective-origin: 0px -100px;\n      -ms-perspective-origin: 0px -100px;\n          perspective-origin: 0px -100px;\n}\n\n.reveal .slides>section,\n.reveal .slides>section>section {\n  display: none;\n  position: absolute;\n  width: 100%;\n  padding: 20px 0px;\n\n  z-index: 10;\n  line-height: 1.2em;\n  font-weight: normal;\n\n  -webkit-transform-style: preserve-3d;\n     -moz-transform-style: preserve-3d;\n      -ms-transform-style: preserve-3d;\n          transform-style: preserve-3d;\n\n  -webkit-transition: -webkit-transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n            -webkit-transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n     -moz-transition: -moz-transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n              -moz-transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n      -ms-transition: -ms-transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n              -ms-transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n       -o-transition: -o-transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n              -o-transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n          transition: transform-origin 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                transform 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      visibility 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985),\n                      opacity 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);\n}\n\n.reveal .slides>section {\n  left: -60%;\n  top: -50%;\n}\n\n.reveal .slides>section.present,\n.reveal .slides>section>section.present {\n  display: block;\n  z-index: 11;\n  opacity: 1;\n}\n\n.reveal.center,\n.reveal.center .slides,\n.reveal.center .slides section {\n  min-height: auto !important;\n}\n\n\n\n/*********************************************\n * DEFAULT TRANSITION\n *********************************************/\n\n.reveal .slides>section.past {\n  display: block;\n  opacity: 0;\n\n  -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);\n     -moz-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);\n      -ms-transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);\n          transform: translate3d(-100%, 0, 0) rotateY(-90deg) translate3d(-100%, 0, 0);\n}\n.reveal .slides>section.future {\n  display: block;\n  opacity: 0;\n\n  -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);\n     -moz-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);\n      -ms-transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);\n          transform: translate3d(100%, 0, 0) rotateY(90deg) translate3d(100%, 0, 0);\n}\n\n.reveal .slides>section>section.past {\n  display: block;\n  opacity: 0;\n\n  -webkit-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);\n     -moz-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);\n      -ms-transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);\n          transform: translate3d(0, -300px, 0) rotateX(70deg) translate3d(0, -300px, 0);\n}\n.reveal .slides>section>section.future {\n  display: block;\n  opacity: 0;\n\n  -webkit-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);\n     -moz-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);\n      -ms-transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);\n          transform: translate3d(0, 300px, 0) rotateX(-70deg) translate3d(0, 300px, 0);\n}\n\n\n/*********************************************\n * CONCAVE TRANSITION\n *********************************************/\n\n.reveal.concave  .slides>section.past {\n  -webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);\n     -moz-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);\n      -ms-transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);\n          transform: translate3d(-100%, 0, 0) rotateY(90deg) translate3d(-100%, 0, 0);\n}\n.reveal.concave  .slides>section.future {\n  -webkit-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);\n     -moz-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);\n      -ms-transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);\n          transform: translate3d(100%, 0, 0) rotateY(-90deg) translate3d(100%, 0, 0);\n}\n\n.reveal.concave  .slides>section>section.past {\n  -webkit-transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0);\n     -moz-transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0);\n      -ms-transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0);\n          transform: translate3d(0, -80%, 0) rotateX(-70deg) translate3d(0, -80%, 0);\n}\n.reveal.concave  .slides>section>section.future {\n  -webkit-transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0);\n     -moz-transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0);\n      -ms-transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0);\n          transform: translate3d(0, 80%, 0) rotateX(70deg) translate3d(0, 80%, 0);\n}\n\n\n/*********************************************\n * ZOOM TRANSITION\n *********************************************/\n\n.reveal.zoom .slides>section.past {\n  opacity: 0;\n  visibility: hidden;\n\n  -webkit-transform: scale(16);\n     -moz-transform: scale(16);\n      -ms-transform: scale(16);\n       -o-transform: scale(16);\n          transform: scale(16);\n}\n.reveal.zoom .slides>section.future {\n  opacity: 0;\n  visibility: hidden;\n\n  -webkit-transform: scale(0.2);\n     -moz-transform: scale(0.2);\n      -ms-transform: scale(0.2);\n       -o-transform: scale(0.2);\n          transform: scale(0.2);\n}\n\n.reveal.zoom .slides>section>section.past {\n  -webkit-transform: translate(0, -150%);\n     -moz-transform: translate(0, -150%);\n      -ms-transform: translate(0, -150%);\n       -o-transform: translate(0, -150%);\n          transform: translate(0, -150%);\n}\n.reveal.zoom .slides>section>section.future {\n  -webkit-transform: translate(0, 150%);\n     -moz-transform: translate(0, 150%);\n      -ms-transform: translate(0, 150%);\n       -o-transform: translate(0, 150%);\n          transform: translate(0, 150%);\n}\n\n\n/*********************************************\n * LINEAR TRANSITION\n *********************************************/\n\n.reveal.linear .slides>section.past {\n  -webkit-transform: translate(-150%, 0);\n     -moz-transform: translate(-150%, 0);\n      -ms-transform: translate(-150%, 0);\n       -o-transform: translate(-150%, 0);\n          transform: translate(-150%, 0);\n}\n.reveal.linear .slides>section.future {\n  -webkit-transform: translate(150%, 0);\n     -moz-transform: translate(150%, 0);\n      -ms-transform: translate(150%, 0);\n       -o-transform: translate(150%, 0);\n          transform: translate(150%, 0);\n}\n\n.reveal.linear .slides>section>section.past {\n  -webkit-transform: translate(0, -150%);\n     -moz-transform: translate(0, -150%);\n      -ms-transform: translate(0, -150%);\n       -o-transform: translate(0, -150%);\n          transform: translate(0, -150%);\n}\n.reveal.linear .slides>section>section.future {\n  -webkit-transform: translate(0, 150%);\n     -moz-transform: translate(0, 150%);\n      -ms-transform: translate(0, 150%);\n       -o-transform: translate(0, 150%);\n          transform: translate(0, 150%);\n}\n\n\n/*********************************************\n * CUBE TRANSITION\n *********************************************/\n\n.reveal.cube .slides {\n  -webkit-perspective: 1300px;\n     -moz-perspective: 1300px;\n      -ms-perspective: 1300px;\n          perspective: 1300px;\n}\n\n.reveal.cube .slides section {\n  padding: 30px;\n  min-height: 600px;\n\n  -webkit-backface-visibility: hidden;\n     -moz-backface-visibility: hidden;\n      -ms-backface-visibility: hidden;\n          backface-visibility: hidden;\n\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n  .reveal.center.cube .slides section {\n    min-height: auto;\n  }\n  .reveal.cube .slides section:not(.stack):before {\n    content: '';\n    position: absolute;\n    display: block;\n    width: 100%;\n    height: 100%;\n    left: 0;\n    top: 0;\n    background: rgba(0,0,0,0.1);\n    border-radius: 4px;\n\n    -webkit-transform: translateZ( -20px );\n       -moz-transform: translateZ( -20px );\n        -ms-transform: translateZ( -20px );\n         -o-transform: translateZ( -20px );\n            transform: translateZ( -20px );\n  }\n  .reveal.cube .slides section:not(.stack):after {\n    content: '';\n    position: absolute;\n    display: block;\n    width: 90%;\n    height: 30px;\n    left: 5%;\n    bottom: 0;\n    background: none;\n    z-index: 1;\n\n    border-radius: 4px;\n    box-shadow: 0px 95px 25px rgba(0,0,0,0.2);\n\n    -webkit-transform: translateZ(-90px) rotateX( 65deg );\n       -moz-transform: translateZ(-90px) rotateX( 65deg );\n        -ms-transform: translateZ(-90px) rotateX( 65deg );\n         -o-transform: translateZ(-90px) rotateX( 65deg );\n            transform: translateZ(-90px) rotateX( 65deg );\n  }\n\n.reveal.cube .slides>section.stack {\n  padding: 0;\n  background: none;\n}\n\n.reveal.cube .slides>section.past {\n  -webkit-transform-origin: 100% 0%;\n     -moz-transform-origin: 100% 0%;\n      -ms-transform-origin: 100% 0%;\n          transform-origin: 100% 0%;\n\n  -webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg);\n     -moz-transform: translate3d(-100%, 0, 0) rotateY(-90deg);\n      -ms-transform: translate3d(-100%, 0, 0) rotateY(-90deg);\n          transform: translate3d(-100%, 0, 0) rotateY(-90deg);\n}\n\n.reveal.cube .slides>section.future {\n  -webkit-transform-origin: 0% 0%;\n     -moz-transform-origin: 0% 0%;\n      -ms-transform-origin: 0% 0%;\n          transform-origin: 0% 0%;\n\n  -webkit-transform: translate3d(100%, 0, 0) rotateY(90deg);\n     -moz-transform: translate3d(100%, 0, 0) rotateY(90deg);\n      -ms-transform: translate3d(100%, 0, 0) rotateY(90deg);\n          transform: translate3d(100%, 0, 0) rotateY(90deg);\n}\n\n.reveal.cube .slides>section>section.past {\n  -webkit-transform-origin: 0% 100%;\n     -moz-transform-origin: 0% 100%;\n      -ms-transform-origin: 0% 100%;\n          transform-origin: 0% 100%;\n\n  -webkit-transform: translate3d(0, -100%, 0) rotateX(90deg);\n     -moz-transform: translate3d(0, -100%, 0) rotateX(90deg);\n      -ms-transform: translate3d(0, -100%, 0) rotateX(90deg);\n          transform: translate3d(0, -100%, 0) rotateX(90deg);\n}\n\n.reveal.cube .slides>section>section.future {\n  -webkit-transform-origin: 0% 0%;\n     -moz-transform-origin: 0% 0%;\n      -ms-transform-origin: 0% 0%;\n          transform-origin: 0% 0%;\n\n  -webkit-transform: translate3d(0, 100%, 0) rotateX(-90deg);\n     -moz-transform: translate3d(0, 100%, 0) rotateX(-90deg);\n      -ms-transform: translate3d(0, 100%, 0) rotateX(-90deg);\n          transform: translate3d(0, 100%, 0) rotateX(-90deg);\n}\n\n\n/*********************************************\n * PAGE TRANSITION\n *********************************************/\n\n.reveal.page .slides {\n  -webkit-perspective-origin: 0% 50%;\n     -moz-perspective-origin: 0% 50%;\n      -ms-perspective-origin: 0% 50%;\n          perspective-origin: 0% 50%;\n\n  -webkit-perspective: 3000px;\n     -moz-perspective: 3000px;\n      -ms-perspective: 3000px;\n          perspective: 3000px;\n}\n\n.reveal.page .slides section {\n  padding: 30px;\n  min-height: 600px;\n\n  -webkit-box-sizing: border-box;\n     -moz-box-sizing: border-box;\n          box-sizing: border-box;\n}\n  .reveal.page .slides section.past {\n    z-index: 12;\n  }\n  .reveal.page .slides section:not(.stack):before {\n    content: '';\n    position: absolute;\n    display: block;\n    width: 100%;\n    height: 100%;\n    left: 0;\n    top: 0;\n    background: rgba(0,0,0,0.1);\n\n    -webkit-transform: translateZ( -20px );\n       -moz-transform: translateZ( -20px );\n        -ms-transform: translateZ( -20px );\n         -o-transform: translateZ( -20px );\n            transform: translateZ( -20px );\n  }\n  .reveal.page .slides section:not(.stack):after {\n    content: '';\n    position: absolute;\n    display: block;\n    width: 90%;\n    height: 30px;\n    left: 5%;\n    bottom: 0;\n    background: none;\n    z-index: 1;\n\n    border-radius: 4px;\n    box-shadow: 0px 95px 25px rgba(0,0,0,0.2);\n\n    -webkit-transform: translateZ(-90px) rotateX( 65deg );\n  }\n\n.reveal.page .slides>section.stack {\n  padding: 0;\n  background: none;\n}\n\n.reveal.page .slides>section.past {\n  -webkit-transform-origin: 0% 0%;\n     -moz-transform-origin: 0% 0%;\n      -ms-transform-origin: 0% 0%;\n          transform-origin: 0% 0%;\n\n  -webkit-transform: translate3d(-40%, 0, 0) rotateY(-80deg);\n     -moz-transform: translate3d(-40%, 0, 0) rotateY(-80deg);\n      -ms-transform: translate3d(-40%, 0, 0) rotateY(-80deg);\n          transform: translate3d(-40%, 0, 0) rotateY(-80deg);\n}\n\n.reveal.page .slides>section.future {\n  -webkit-transform-origin: 100% 0%;\n     -moz-transform-origin: 100% 0%;\n      -ms-transform-origin: 100% 0%;\n          transform-origin: 100% 0%;\n\n  -webkit-transform: translate3d(0, 0, 0);\n     -moz-transform: translate3d(0, 0, 0);\n      -ms-transform: translate3d(0, 0, 0);\n          transform: translate3d(0, 0, 0);\n}\n\n.reveal.page .slides>section>section.past {\n  -webkit-transform-origin: 0% 0%;\n     -moz-transform-origin: 0% 0%;\n      -ms-transform-origin: 0% 0%;\n          transform-origin: 0% 0%;\n\n  -webkit-transform: translate3d(0, -40%, 0) rotateX(80deg);\n     -moz-transform: translate3d(0, -40%, 0) rotateX(80deg);\n      -ms-transform: translate3d(0, -40%, 0) rotateX(80deg);\n          transform: translate3d(0, -40%, 0) rotateX(80deg);\n}\n\n.reveal.page .slides>section>section.future {\n  -webkit-transform-origin: 0% 100%;\n     -moz-transform-origin: 0% 100%;\n      -ms-transform-origin: 0% 100%;\n          transform-origin: 0% 100%;\n\n  -webkit-transform: translate3d(0, 0, 0);\n     -moz-transform: translate3d(0, 0, 0);\n      -ms-transform: translate3d(0, 0, 0);\n          transform: translate3d(0, 0, 0);\n}\n\n\n/*********************************************\n * TILE-FLIP TRANSITION (CSS shader)\n *********************************************/\n\n.reveal.tileflip .slides section.present {\n  -webkit-transform: none;\n  -webkit-transition-duration: 800ms;\n\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 0, randomness 0, flipAxis 0 1 0, tileOutline 1\n  );\n}\n\n.reveal.tileflip .slides section.past {\n  -webkit-transform: none;\n  -webkit-transition-duration: 800ms;\n\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 1, randomness 0, flipAxis 0 1 0, tileOutline 1\n  );\n}\n\n.reveal.tileflip .slides section.future {\n  -webkit-transform: none;\n  -webkit-transition-duration: 800ms;\n\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 1, randomness 0, flipAxis 0 1 0, tileOutline 1\n  );\n}\n\n.reveal.tileflip .slides>section>section.present {\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 0, randomness 2, flipAxis 1 0 0, tileOutline 1\n  );\n}\n\n.reveal.tileflip .slides>section>section.past {\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 1, randomness 2, flipAxis 1 0 0, tileOutline 1\n  );\n}\n\n.reveal.tileflip .slides>section>section.future {\n  -webkit-filter: custom( url(shaders/tile-flip.vs) mix(url(shaders/tile-flip.fs) multiply source-atop), 10 10 border-box detached, transform perspective(1000) scale(1) rotateX(0deg) rotateY(0deg) rotateZ(0deg),\n    amount 1, randomness 2, flipAxis 1 0 0, tileOutline 1\n  );\n}\n\n\n/*********************************************\n * NO TRANSITION\n *********************************************/\n\n.reveal.none .slides section {\n  -webkit-transform: none;\n     -moz-transform: none;\n      -ms-transform: none;\n       -o-transform: none;\n          transform: none;\n\n  -webkit-transition: none;\n     -moz-transition: none;\n      -ms-transition: none;\n       -o-transition: none;\n          transition: none;\n}\n\n\n/*********************************************\n * OVERVIEW\n *********************************************/\n\n.reveal.overview .slides {\n  -webkit-perspective-origin: 0% 0%;\n     -moz-perspective-origin: 0% 0%;\n      -ms-perspective-origin: 0% 0%;\n          perspective-origin: 0% 0%;\n\n  -webkit-perspective: 700px;\n     -moz-perspective: 700px;\n      -ms-perspective: 700px;\n          perspective: 700px;\n}\n\n.reveal.overview .slides section {\n  height: 600px;\n  overflow: hidden;\n  opacity: 1!important;\n  visibility: visible!important;\n  cursor: pointer;\n  background: rgba(0,0,0,0.1);\n}\n.reveal.overview .slides section .fragment {\n  opacity: 1;\n}\n.reveal.overview .slides section:after,\n.reveal.overview .slides section:before {\n  display: none !important;\n}\n.reveal.overview .slides section>section {\n  opacity: 1;\n  cursor: pointer;\n}\n  .reveal.overview .slides section:hover {\n    background: rgba(0,0,0,0.3);\n  }\n  .reveal.overview .slides section.present {\n    background: rgba(0,0,0,0.3);\n  }\n.reveal.overview .slides>section.stack {\n  padding: 0;\n  background: none;\n  overflow: visible;\n}\n\n\n/*********************************************\n * PAUSED MODE\n *********************************************/\n\n.reveal .pause-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background: black;\n  visibility: hidden;\n  opacity: 0;\n  z-index: 100;\n\n  -webkit-transition: all 1s ease;\n     -moz-transition: all 1s ease;\n      -ms-transition: all 1s ease;\n       -o-transition: all 1s ease;\n          transition: all 1s ease;\n}\n.reveal.paused .pause-overlay {\n  visibility: visible;\n  opacity: 1;\n}\n\n\n/*********************************************\n * FALLBACK\n *********************************************/\n\n.no-transforms {\n  overflow-y: auto;\n}\n\n.no-transforms .slides {\n  top: 0;\n  left: 50%;\n  margin: 0;\n  text-align: center;\n}\n\n.no-transforms .slides section {\n  display: block!important;\n  opacity: 1!important;\n  position: relative!important;\n  height: auto;\n  min-height: auto;\n  top: 0;\n  left: -50%;\n  margin: 70px 0;\n\n  -webkit-transform: none;\n     -moz-transform: none;\n      -ms-transform: none;\n          transform: none;\n}\n\n.no-transforms .slides section section {\n  left: 0;\n}\n\n.no-transition {\n  -webkit-transition: none;\n     -moz-transition: none;\n      -ms-transition: none;\n       -o-transition: none;\n          transition: none;\n}\n\n\n/*********************************************\n * BACKGROUND STATES\n *********************************************/\n\n.reveal .state-background {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  background: rgba( 0, 0, 0, 0 );\n\n  -webkit-transition: background 800ms ease;\n     -moz-transition: background 800ms ease;\n      -ms-transition: background 800ms ease;\n       -o-transition: background 800ms ease;\n          transition: background 800ms ease;\n}\n.alert .reveal .state-background {\n  background: rgba( 200, 50, 30, 0.6 );\n}\n.soothe .reveal .state-background {\n  background: rgba( 50, 200, 90, 0.4 );\n}\n.blackout .reveal .state-background {\n  background: rgba( 0, 0, 0, 0.6 );\n}\n\n\n/*********************************************\n * RTL SUPPORT\n *********************************************/\n\n.reveal.rtl .slides,\n.reveal.rtl .slides h1,\n.reveal.rtl .slides h2,\n.reveal.rtl .slides h3,\n.reveal.rtl .slides h4,\n.reveal.rtl .slides h5,\n.reveal.rtl .slides h6 {\n  direction: rtl;\n  font-family: sans-serif;\n}\n\n.reveal.rtl pre,\n.reveal.rtl code {\n  direction: ltr;\n}\n\n.reveal.rtl ol,\n.reveal.rtl ul {\n  text-align: right;\n}\n\n\n/*********************************************\n * SPEAKER NOTES\n *********************************************/\n\n.reveal aside.notes {\n  display: none;\n}\n\n\n/*********************************************\n * ZOOM PLUGIN\n *********************************************/\n\n.zoomed .reveal *,\n.zoomed .reveal *:before,\n.zoomed .reveal *:after {\n  -webkit-transform: none !important;\n     -moz-transform: none !important;\n      -ms-transform: none !important;\n          transform: none !important;\n\n  -webkit-backface-visibility: visible !important;\n     -moz-backface-visibility: visible !important;\n      -ms-backface-visibility: visible !important;\n          backface-visibility: visible !important;\n}\n\n.zoomed .reveal .progress,\n.zoomed .reveal .controls {\n  opacity: 0;\n}\n\n.zoomed .reveal .roll span {\n  background: none;\n}\n\n.zoomed .reveal .roll span:after {\n  visibility: hidden;\n}\n\n\n"
  },
  {
    "path": "css/shaders/tile-flip.fs",
    "content": "/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n * Copyright (c) 2012 Branislav Ulicny\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nprecision mediump float;\n\n// Uniform values from CSS\n\nuniform float amount;\nuniform float tileOutline;\n\n// Built-in uniforms\n\nuniform vec2 u_meshSize;\nuniform vec2 u_textureSize;\n\n// Varyings passed in from vertex shader\n\nvarying float v_depth;\nvarying vec2 v_uv;\n\n// Main\n\nvoid main()\n{\n\t// FIXME: Must swap x and y as a workaround for: \n\t// https://bugs.webkit.org/show_bug.cgi?id=96285\n\tvec2 u_meshSize = u_meshSize.yx;\n\n\tvec4 c = vec4(1.0);\n\n\t// Fade out.\n\tc.a = 1.0 - v_depth;\n\n\t// Show grid outline.\n\tif (tileOutline >= 0.5) {\n\t\tfloat cell_width = u_textureSize.x / u_meshSize.y;\n\t\tfloat cell_height = u_textureSize.y / u_meshSize.x;\n\t\tfloat dd = 1.0;\n\n\t\tif (mod(v_uv.x * u_textureSize.x + dd, cell_width) < 2.0\n\t\t\t|| mod(v_uv.y * u_textureSize.y + dd, cell_height) < 2.0) {\n\t\t\tif (amount > 0.0)\n\t\t\t\tc.rgb = vec3(1.0 - sqrt(amount));\n\t\t}\n\t}\n\tcss_ColorMatrix = mat4(c.r, 0.0, 0.0, 0.0,\n\t\t\t\t\t\t\t0.0, c.g, 0.0, 0.0,\n\t\t\t\t\t\t\t0.0, 0.0, c.b, 0.0,\n\t\t\t\t\t\t\t0.0, 0.0, 0.0, c.a);\n}\n"
  },
  {
    "path": "css/shaders/tile-flip.vs",
    "content": "/*\n * Copyright (c)2012 Adobe Systems Incorporated. All rights reserved.\n * Copyright (c)2012 Branislav Ulicny\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nprecision mediump float;\n\n// Built-in attributes\n\nattribute vec4 a_position;\nattribute vec2 a_texCoord;\nattribute vec3 a_triangleCoord;\n\n// Built-in uniforms\n\nuniform mat4 u_projectionMatrix;\nuniform vec2 u_meshSize;\nuniform vec2 u_textureSize;\n\n// Uniform passed in from CSS\n\nuniform mat4 transform;\nuniform float amount;\nuniform float randomness;\nuniform vec3 flipAxis;\n\n// Varyings\n\nvarying float v_depth;\nvarying vec2 v_uv;\n\n// Constants\n\nconst float PI2 = 1.5707963267948966;\n\n// Create perspective matrix\n\nmat4 perspectiveMatrix(float p)\n{\n    float perspective = - 1.0 / p;\n    return mat4(\n\t\t1.0, 0.0, 0.0, 0.0,\n\t\t0.0, 1.0, 0.0, 0.0,\n\t\t0.0, 0.0, 1.0, perspective,\n\t\t0.0, 0.0, 0.0, 1.0\n\t);\n}\n\n// Rotate vector\n\nvec3 rotateVectorByQuaternion(vec3 v, vec4 q)\n{\n\tvec3 dest = vec3(0.0);\n\n\tfloat x = v.x, y  = v.y, z  = v.z;\n\tfloat qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n\n\t// Calculate quaternion * vector.\n\n\tfloat ix =  qw * x + qy * z - qz * y,\n\t\t  iy =  qw * y + qz * x - qx * z,\n\t\t  iz =  qw * z + qx * y - qy * x,\n\t\t  iw = -qx * x - qy * y - qz * z;\n\n\t// Calculate result * inverse quaternion.\n\n\tdest.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n\tdest.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n\tdest.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\n\treturn dest;\n}\n\n// Convert rotation.\n\nvec4 axisAngleToQuaternion(vec3 axis, float angle)\n{\n\tvec4 dest = vec4(0.0);\n\n\tfloat halfAngle = angle / 2.0;\n\tfloat s = sin(halfAngle);\n\n\tdest.x = axis.x * s;\n\tdest.y = axis.y * s;\n\tdest.z = axis.z * s;\n\tdest.w = cos(halfAngle);\n\n\treturn dest;\n}\n\n// Random function based on the tile coordinate.\n// This will return the same value for all the vertices in the same tile (i.e. two triangles).\n\nfloat random(vec2 scale)\n{\n    // Use the fragment position as a different seed per-pixel.\n    return fract(sin(dot(vec2(a_triangleCoord.x, a_triangleCoord.y), scale)) * 4000.0);\n}\n\n// Main\n\nvoid main()\n{\n\t// FIXME: We must swap x and y as a workaround for: \n\t// https://bugs.webkit.org/show_bug.cgi?id=96285\n\tvec2 u_meshSize = u_meshSize.yx;\n\n  \tvec4 pos = a_position;\n\tfloat aspect = u_textureSize.x / u_textureSize.y;\n\n\tfloat cx = a_triangleCoord.x / u_meshSize.y - 0.5 + 0.5 / u_meshSize.y;\n\tfloat cy = a_triangleCoord.y / u_meshSize.x - 0.5 + 0.5 / u_meshSize.x;\n\n\tvec3 centroid = vec3(cx, cy, 0.0);\n\tfloat r = random(vec2(10.0, 80.0));\n\tfloat rr = mix(0.0, PI2, amount * (1.0 + randomness * r));\n\n\tvec4 rotation = vec4(flipAxis, rr);\n\tvec4 qRotation = axisAngleToQuaternion(normalize(rotation.xyz), rotation.w);\n\n\tvec3 newPosition = rotateVectorByQuaternion((pos.xyz - centroid)* vec3(aspect, 1., 1.0), qRotation) * vec3(1.0 / aspect, 1.0, 1.0) + centroid;\n\tpos.xyz = newPosition;\n\n\tgl_Position = u_projectionMatrix * transform * pos;\n\n\t// Pass varyings to the fragment shader.\n\tv_depth = abs(rr)/ PI2;\n\tv_uv = a_texCoord;\n}\n"
  },
  {
    "path": "css/theme/default.css",
    "content": "@import url(http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);\n/**\n * Default theme for reveal.js.\n * \n * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se\n */\n@font-face {\n  font-family: 'League Gothic';\n  src: url(\"../../lib/font/league_gothic-webfont.eot\");\n  src: url(\"../../lib/font/league_gothic-webfont.eot?#iefix\") format(\"embedded-opentype\"), url(\"../../lib/font/league_gothic-webfont.woff\") format(\"woff\"), url(\"../../lib/font/league_gothic-webfont.ttf\") format(\"truetype\"), url(\"../../lib/font/league_gothic-webfont.svg#LeagueGothicRegular\") format(\"svg\");\n  font-weight: normal;\n  font-style: normal;\n}\n\n/*********************************************\n * GLOBAL STYLES\n *********************************************/\nbody {\n  background: #1c1e20;\n  background: -moz-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);\n  background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #555a5f), color-stop(100%, #1c1e20));\n  background: -webkit-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);\n  background: -o-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);\n  background: -ms-radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);\n  background: radial-gradient(center, circle cover, #555a5f 0%, #1c1e20 100%);\n  background-color: #2b2b2b;\n}\n\n.reveal {\n  /** font-family: \"Lato\", Times, \"Times New Roman\", serif;  **/\n  font-family: '微软雅黑', \"Lato\", Times, \"Times New Roman\", serif; \n  font-size: 36px;\n  font-weight: 200;\n  letter-spacing: -0.02em;\n  color: #eeeeee;\n}\n\n::selection {\n  color: white;\n  background: #ff5e99;\n  text-shadow: none;\n}\n\n/*********************************************\n * HEADERS\n *********************************************/\n.reveal h1,\n.reveal h2,\n.reveal h3,\n.reveal h4,\n.reveal h5,\n.reveal h6 {\n  margin: 0 0 20px 0;\n  color: #eeeeee;\n  font-family: \"League Gothic\", Impact, sans-serif;\n  line-height: 0.9em;\n  letter-spacing: 0.02em;\n  text-transform: uppercase;\n  text-shadow: 0px 0px 6px rgba(0, 0, 0, 0.2);\n}\n\n.reveal h1 {\n  text-shadow: 0 1px 0 #cccccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbbbbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaaaaa, 0 6px 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.3), 0 3px 5px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.25), 0 20px 20px rgba(0, 0, 0, 0.15);\n}\n\n/*********************************************\n * LINKS\n *********************************************/\n.reveal a:not(.image) {\n  color: #13daec;\n  text-decoration: none;\n  -webkit-transition: color .15s ease;\n  -moz-transition: color .15s ease;\n  -ms-transition: color .15s ease;\n  -o-transition: color .15s ease;\n  transition: color .15s ease;\n}\n\n.reveal a:not(.image):hover {\n  color: #71e9f4;\n  text-shadow: none;\n  border: none;\n}\n\n.reveal .roll span:after {\n  color: #fff;\n  background: #0d99a5;\n}\n\n/*********************************************\n * IMAGES\n *********************************************/\n.reveal section img {\n  margin: 15px 0px;\n  background: rgba(255, 255, 255, 0.12);\n  border: 0px solid #eeeeee;\n  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);\n  -webkit-transition: all .2s linear;\n  -moz-transition: all .2s linear;\n  -ms-transition: all .2s linear;\n  -o-transition: all .2s linear;\n  transition: all .2s linear;\n}\n\n.reveal a:hover img {\n  background: rgba(255, 255, 255, 0.2);\n  border-color: #13daec;\n  box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);\n}\n\n/*********************************************\n * NAVIGATION CONTROLS\n *********************************************/\n.reveal .controls div.navigate-left,\n.reveal .controls div.navigate-left.enabled {\n  border-right-color: #13daec;\n}\n\n.reveal .controls div.navigate-right,\n.reveal .controls div.navigate-right.enabled {\n  border-left-color: #13daec;\n}\n\n.reveal .controls div.navigate-up,\n.reveal .controls div.navigate-up.enabled {\n  border-bottom-color: #13daec;\n}\n\n.reveal .controls div.navigate-down,\n.reveal .controls div.navigate-down.enabled {\n  border-top-color: #13daec;\n}\n\n.reveal .controls div.navigate-left.enabled:hover {\n  border-right-color: #71e9f4;\n}\n\n.reveal .controls div.navigate-right.enabled:hover {\n  border-left-color: #71e9f4;\n}\n\n.reveal .controls div.navigate-up.enabled:hover {\n  border-bottom-color: #71e9f4;\n}\n\n.reveal .controls div.navigate-down.enabled:hover {\n  border-top-color: #71e9f4;\n}\n\n/*********************************************\n * PROGRESS BAR\n *********************************************/\n.reveal .progress {\n  background: rgba(0, 0, 0, 0.2);\n}\n\n.reveal .progress span {\n  background: #13daec;\n  -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);\n  -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);\n  -ms-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);\n  -o-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);\n  transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);\n}\n\n.reveal .dongwmhead  {\n\n  font-size: 48.0pt;\n}\n\n.reveal .dongwmtitle  {\n\n  font-size: 40.0pt;\n}\n\n.reveal .dongwmcsm {\n  font-family:'comic sans ms';\n}\n\n.reveal .dongwmblue {\n  color: rgb(32,117,165);\n  font-weight: bold;\n  text-transform: uppercase;\n}\n\n.reveal .dongwmmenu {\n  font-family:'comic sans ms';\n  color: #CC0066;\n  font-size: 110px;\n  text-transform: uppercase;\n}\n\n.reveal .dongwmleft {\n  margin-left: 250px;\n  text-align: left;\n}\n\n.reveal .dongwmgreen {\n\n  font-weight: bold;\n  color: #009242;\n  text-transform: uppercase;\n}\n\n.reveal .dongwmfoot  {\n\n  font-size: 48.0pt;color: rgb(32,117,165);text-transform: uppercase;font-weight: bold;\n}\n\n.reveal .dongwmright  {\n  margin-left: 450px;\n  text-align: left;\n}\n\n.reveal #rightimg  {\n  float: right;\n  width: 120px;\n  height: 50px;\n  vertical-align:text-bottom;\n}\n\n.reveal #leftimg  {\n  position: relative;\n  float: left;\n  width: 100px;\n  height: 40px;\n  left: 160px;\n  bottom: -250px;\n}\n\n.reveal iframe {\n  margin-bottom: -150px;\n}"
  },
  {
    "path": "index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\n\t\t<title>sed & awk</title>\n\n\t\t<meta name=\"description\" content=\"2012年工作总结\">\n\t\t<meta name=\"author\" content=\"Dongweiming\">\n\n\t\t<link rel=\"stylesheet\" href=\"css/reveal.min.css\">\n\t\t<link rel=\"stylesheet\" href=\"css/theme/default.css\" id=\"theme\">\n\t\t<link rel=\"stylesheet\" href=\"lib/css/zenburn.css\">\n\n\t\t<!--[if lt IE 9]>\n\t\t<script src=\"lib/js/html5shiv.js\"></script>\n\t\t<![endif]-->\n\t</head>\n\n\t<body>\n\n\t\t<div class=\"reveal\">\n\n\t\t\t<div class=\"slides\">\n\n\t\t\t\t<section>\n\t\t\t\t\t<p><span class=\"dongwmhead dongwmmenu\">sed & awk</span></p>\n\t\t\t\t\t</br> \n\t\t\t\t\t</br>\n\t\t\t\t\t<p class=\"dongwmright\">姓名：<a href=\"#\">董伟明</a></p>\n\t\t\t\t\t<p class=\"dongwmright\">日期：<a href=\"#\"><font face=\"comic sans ms\">2013-12-09</font></a></p>\n\t\t\t\t\t<iframe src=\"http://ghbtns.com/github-btn.html?user=dongweiming&repo=sed_and_awk&type=fork\"\n\t\t\t\t\t  allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"132\" height=\"20\"></iframe>\n\t\t\t\t\t<iframe src=\"http://ghbtns.com/github-btn.html?user=dongweiming&repo=sed_and_awk&type=watch\"\n\t\t\t\t\t  allowtransparency=\"true\" frameborder=\"0\" scrolling=\"0\" width=\"165\" height=\"20\"></iframe>\n\t\t\t\t\t\n\t\t\t\t</section>\n\n\t\t\t\t<section>\n\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen dongwmcsm\">(一)sed</h2>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">学完本章的后果</h2>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">把123变成[123](不要sed \"s/\\([0-9]\\{3\\}\\)/[\\1]/\")</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">这是什么意思: echo \"1\\n2\\n3\\n4\"|sed -n \"/2/, +2p\"(gnu sed)</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">这是什么意思: echo \"1\\n2\\n3\"|sed '2 c 4' (gnu sed)</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">把This is UPPER变成IS,This,upper(gnu sed)</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">这是什么意思: sed 'H;x;s/^\\(.*\\)\\n\\(.*\\)/\\2\\1/'</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">实现tac命令的功能</li>\n\t\t\t\t\t</ol>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">语法1</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed [options] {sed-commands} {input-file}\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# -n表示取消默认输出,p表示打印行\n$sed -n 'p' /etc/passwd\n# 只打印第三行\n$sed -n '3p' /etc/passwd\n# 打印1，3行\n$sed -n '1,3p' /etc/passwd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">语法2</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$sed [options] -f {sed-commands-in-a-file} {input-file}\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 打印以root开头或者nobody开头的行\n$cat sed_example_1.sed\n/^root/ p\n/^nobody/ p\n\n$ sed -n -f sed_example_1.sed /etc/passwd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">语法3</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed [options] -e {sed-command-1} -e {sed-command-2} {input-file}\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 打印以root开头或者nobody开头的行\n$sed -n -e '/^root/ p' -e '/^nobody/ p' /etc/passwd\n\n#或者\n$sed -n \\\n-e '/^root/ p' \\\n-e '/^nobody/ p' \\\n/etc/passwd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">语法4</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed [options] '{\nsed-command-1\nsed-command-2\n}' input-file\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 打印以root开头或者nobody结尾的行\nsed -n '{\n/^root/ p\n/nobody$/ p\n}' /etc/passwd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">sed流</h2>\n\t\t\t\t\t</br>\n\t\t\t\t\t\t<ol>\n\t\t\t\t\t\t\t<li class=\"fragment highlight-blue\">读</li>\n\t\t\t\t\t\t\t<li class=\"fragment highlight-blue\">执行</li>\n\t\t\t\t\t\t\t<li class=\"fragment highlight-blue\">打印</li>\n\t\t\t\t\t\t\t<li class=\"fragment highlight-blue\">重复</li>\n\t\t\t\t\t\t</ol>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">源文件</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">范围</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 在freebsd版sed不能用\n$/usr/local/bin/sed -n '1~2 p' source.txt \n101,Ian Bicking,Mozilla\n103,Paul Irish,Google\n105,Chris Wanstrath,Github\n107,Ask Solem Hoel,VMware\n\n# 在freebsd版sed不能用\n$/usr/local/bin/sed -n '2~3 p' source.txt \n102,Hakim El Hattab,Whim\n105,Chris Wanstrath,Github\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">模式匹配</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 寻找包含Paul的行\n$sed -n '/Paul/ p' source.txt\n103,Paul Irish,Google\n# 从第一行开始到第五行, 从找到开始打印到第五行\n$sed -n '/Paul/,5 p' source.txt\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n\n# 从匹配Paul行打印达匹配Addy的行\n$sed -n '/Paul/,/Addy/ p' source.txt\n103,Paul Irish,Google\n104,Addy Osmani,Google\n# 在freebsd版sed不能用 匹配Paul行再多输出2行\n$/usr/local/bin/sed -n '/Paul/,+2 p' source.txt\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">删除行</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 删除所有行\n$sed 'd' source.txt \n# 只删除第二行\n$sed '2 d' source.txt \n...\n# 删除第一到第四行\n$sed '1,4 d' source.txt\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n# 删除奇数行\n$/usr/local/bin/sed '1~2 d' source.txt\n102,Hakim El Hattab,Whim\n104,Addy Osmani,Google\n106,Mattt Thompson,Heroku\n# 删除符合Paul到Addy的行\n$sed '/Paul/,/Addy/d' source.txt\n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n# 删除空行\n$sed '/^$/ d' source.txt\n# 删除评论行\n$sed '/^#/ d' source.txt\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">重定向</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 将source.txt内容重定向写到output.txt\n$sed 'w output.txt' source.txt\n# 和上面一样,但是没有在终端显示\n$sed -n 'w output.txt' source.txt\n# 只写第二行\n$ sed -n '2 w output.txt' source.txt\n# 写一到四行到output.txt\n$sed -n '1,4 w output.txt'\n# 写匹配Ask的行到结尾行到output.txt\n$sed -n '/Ask/,$ w output.txt'\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">替换</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed '[address-range|pattern-range] s/original-\nstring/replacement-string/[substitute-flags]' inputfile\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 替换Google为Github\n$sed 's/Google/Github/' source.txt\n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n103,Paul Irish,Github\n104,Addy Osmani,Github\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n# 替换匹配Addy的行里面的Google为Github\n$sed '/Addy/s/Google/Github/' source.txt\n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n103,Paul Irish,Google\n104,Addy Osmani,Github\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n# 默认s只会替换一行中的第一个匹配项\n$sed '1s/a/A/'  source.txt|head -1\n101,IAn Bicking,Mozilla\n# g可以替换每行的全部符合\n$sed '1s/a/A/g'  source.txt|head -1\n101,IAn Bicking,MozillA\n# 可以直接指定想要替换的第N个匹配项,这里是第二个\n$sed '1s/a/A/2'  source.txt|head -1\n101,Ian Bicking,MozillA\n# 使用w将能够替换的行重定向写到output.txt\n$sed -n 's/Mozilla/Github/w output.txt' source.txt\n$cat output.txt \n101,Ian Bicking,Github\n# 还可以使用i忽略匹配的大小写,看来freebsd的不能用\n$/usr/local/bin/sed '1s/ian/IAN/i'  source.txt|head -1\n101,IAN Bicking,Mozilla\n# 这里有个新的文件\n$cat files.txt \n/etc/passwd\n/etc/group\n# 给每行前和后都添加点字符\n$sed 's/\\(.*\\)/ls -l \\1|head -1/' files.txt\nls -l /etc/passwd|head -1\nls -l /etc/group|head -1\n# 我要用sed执行这个字符串命令了 无奈..mac上得sed都不行\ndongwm@bj-1:~$ sed 's/^/ls -l /e' files.txt\n-rw-r--r-- 1 root root 1627 Oct 14 14:30 /etc/passwd\n-rw-r--r-- 1 root root 807 Oct 14 14:30 /etc/group\n# sed分隔符不只可以使用'/'\n$sed 's|/usr/local/bin|/usr/bin|' path.txt\n$sed 's^/usr/local/bin^/usr/bin^' path.txt\n$sed 's@/usr/local/bin@/usr/bin@' path.txt\n$sed 's!/usr/local/bin!/usr/bin!' path.txt\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">替换覆盖</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed '{\ns/Google/Github/\ns/Git/git/ \n}' source.txt \n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n103,Paul Irish,github\n104,Addy Osmani,github\n105,Chris Wanstrath,github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">神奇的&</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$sed 's/^[0-9][0-9][0-9]/[&]/g'\n[101],Ian Bicking,Mozilla\n[102],Hakim El Hattab,Whim\n[103],Paul Irish,Google\n[104],Addy Osmani,Google\n[105],Chris Wanstrath,Github\n[106],Mattt Thompson,Heroku\n[107],Ask Solem Hoel,VMware\n$sed 's/^.*/<\\&>/' source.txt \n<101,Ian Bicking,Mozilla>\n<102,Hakim El Hattab,Whim>\n<103,Paul Irish,Google>\n<104,Addy Osmani,Google>\n<105,Chris Wanstrath,Github>\n<106,Mattt Thompson,Heroku>\n<107,Ask Solem Hoel,VMware>\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">正则</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# ^表示匹配以什么开头\n$sed -n '/^101/ p' source.txt      \n101,Ian Bicking,Mozilla\n# $表示匹配以什么结尾\n$sed -n '/Github$/ p' source.txt \n105,Chris Wanstrath,Github\n# .表示单个字符,下面的匹配一个逗号然后I然后2个单字符\n$sed -n '/,I../ p' source.txt\n101,Ian Bicking,Mozilla\n# *表示匹配0个或者多个, \\+表示匹配一个或者多个, \\?表示匹配0个或者1个\n# [0-9]表示匹配数字,下面匹配包含3或者4的行\n$sed -n '/[34]/ p ' source.txt      \n103,Paul Irish,Google\n104,Addy Osmani,Google\n# -表示范围,这里匹配3,4,5\n$sed -n '/[3-5]/ p ' source.txt\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n# |表示或者的关系\n$/usr/local/bin/sed -n '/102\\|103/ p ' source.txt\n102,Hakim El Hattab,Whim\n103,Paul Irish,Google\n# 看一个文件\n$cat numbers.txt \n1\n12\n123\n1234\n12345\n123456\n# {m} 表示前面的匹配的重复次数\n$sed -n '/^[0-9]\\{5\\}$/ p' numbers.txt\n12345\n#{m,n } 表示匹配m-n的次数都算\nsed -n '/^[0-9]\\{3,5\\}$/ p' numbers.txt\n123\n1234\n12345\n# 删除所有注释行和空行\n$sed -e 's/#.*//' -e '/^$/ d' /etc/profile\t\t\t\t\t\t\t\n# 转化windows文件到unix格式\n$sed 's/.$//' filename\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n#\\1表示第一个正则匹配到的数据\n$sed 's/\\([^,]*\\).*/\\1/g' source.txt |head -1\n101\n#给每个单词第一个字母加括号\n$echo \"Dong Wei Ming\" | /usr/local/bin/sed 's/\\(\\b[A-Z]\\)/\\(\\1\\)/g'\n(D)ong (W)ei (M)ing\n$/usr/local/bin/sed 's/\\(^\\|[^0-9.]\\)\\([0-9]\\+\\)\\([0-9]\\{3\\}\\)/\\1\\2,\\3/g' numbers.txt\n1\n12\n123\n1,234\n12,345\n123,456\n# 只取第一和第三列,并且换了他们的位置\n$sed 's/\\([^,]*\\),\\([^,]*\\),\\([^,]*\\).*/\\3,\\1/g' source.txt\nMozilla,101\nWhim,102\nGoogle,103\nGoogle,104\nGithub,105\nHeroku,106\nVMware,107\n\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">Gnu sed</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# \\l能将后面的一个字符变成小写\n$sed 's/Ian/IAN/' source.txt|head -1               \n101,IAN Bicking,Mozilla\n$/usr/local/bin/sed 's/Ian/IA\\lN/' source.txt|head -1 \n101,IAn Bicking,Mozilla\n# \\L能将后面的字符都变成小写\n$/usr/local/bin/sed 's/Ian/I\\LAN/' source.txt|head -1\n101,Ian Bicking,Mozilla\n# \\u能将后面的一个字符变成大写\n$/usr/local/bin/sed 's/Ian/IA\\un/' source.txt|head -1\n101,IAN Bicking,Mozilla\n# \\U能将后面的字都变成大写\n$/usr/local/bin/sed 's/Ian/\\Uian/' source.txt|head -1 \n101,IAN Bicking,Mozilla\n# \\E能打断\\L或者\\U改变大小写\n$/usr/local/bin/sed 's/Ian/\\Uia\\En/' source.txt|head -1\n101,IAn Bicking,Mozilla\n# 使用以上功能:调换前2列,把名字列全部大写,公司列全部小写\n$/usr/local/bin/sed 's/\\([^,]*\\),\\([^,]*\\),\\(.*\\).*/\\U\\2\\E,\\1,\\L\\3/g' source.txt\nIAN BICKING,101,mozilla\nHAKIM EL HATTAB,102,whim\nPAUL IRISH,103,google\nADDY OSMANI,104,google\nCHRIS WANSTRATH,105,github\nMATTT THOMPSON,106,heroku\nASK SOLEM HOEL,107,vmware\n\n\n\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">sed可执行脚本</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$cat testscript.sed\n#!/usr/bin/sed -nf\n/root/ p\n/nobody/ p\n$chmod u+x testscript.sed\n$./testscript.sed /etc/passwd \nnobody:*:-2:-2:Unprivileged User:/var/empty:/usr/bin/false\nroot:*:0:0:System Administrator:/var/root:/bin/sh\ndaemon:*:1:1:System Services:/var/root:/usr/bin/false\n_cvmsroot:*:212:212:CVMS Root:/var/empty:/usr/bin/false\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">sed修改源文件和备份</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n#-i会修改源文件,但是可以同时使用bak备份\n$sed -ibak 's/Ian/IAN/' source.txt \n# or\nsed --in-place=bak 's/Ian/IAN/' source.txt \n# 这样会存在一个文件source.txtbak\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">行后增加语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed '[address] a the-line-to-append' input-file\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$/usr/local/bin/sed '2 a 108,Donald Stufft, Nebula' source.txt\n101,IAN Bicking,Mozilla\n102,Hakim El Hattab,Whim\n108,Donald Stufft, Nebula\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">行前插入语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed '[address] i the-line-to-insert' input-file\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$/usr/local/bin/sed '2 i 108,Donald Stufft, Nebula' source.txt\n101,IAN Bicking,Mozilla\n108,Donald Stufft, Nebula\n102,Hakim El Hattab,Whim\n103,Paul Irish,Google\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">修改行语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nsed '[address] c the-line-to-insert' input-file\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n\t\t\t\t\t\t\t# 修改符合Paul行为...\n$/usr/local/bin/sed '/Paul/ c 108,Donald Stufft, Nebula' source.txt\n101,IAN Bicking,Mozilla\n102,Hakim El Hattab,Whim\n108,Donald Stufft, Nebula\n104,Addy Osmani,Google\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">sed其他</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# -l会显示隐藏字符比如'\\t', = 可以显示行号\n$sed -l = source.txt\n# y或翻译你要转换的字符,这里I会转化成i，B转换成b\n$sed 'y/IB/ib/' source.txt |head -1\n101,iAN bicking,Mozilla\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen dongwmcsm\">(二)Sed高级话题</h2>\n\t\t\t\t\t<small><h3 class=\"dongwmblue\">保持空间和模式空间</h3></small>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">源码</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n#先看一个文件\n$cat source2.txt \nIan Bicking\nMozilla\nHakim El Hattab\nWhim\nPaul Irish\nGoogle\nChris Wanstrath\nGithub\nMattt Thompson\nHeroku\t\t\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">交换模式空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 通过公司找到这个人, x命令交换当前行到保持空间,\n# n读取下一行到模式空间; 匹配这个模式空间, 假如符合,再交换模式空间，打印\n$/usr/local/bin/sed  -n -e 'x;n' -e '/Whim/{x;p}' source2.txt  \nHakim El Hattab\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">拷贝模式空间到保持空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 还是前面的需求.h拷贝模式空间到保持空间, \n# 如果当前模式空间不匹配, 就拷贝空间到保持空间. 他们会一样\n# 但是当Whim匹配保持空间还是上面一行关于名字的缓存\n$/usr/local/bin/sed  -n -e '/Whim/!h' -e '/Whim/{x;p}' source2.txt  \nHakim El Hattab\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">增加模式空间到保持空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 当我根据Whim想显示他的名字和公司名字呢？ - 给保持空间多加一个\n# H表示增加模式空间到保持空间\n$/usr/local/bin/sed -n -e '/Whim/!h' -e '/Whim/{H;x;p}' source2.txt \nHakim El Hattab\nWhim\n# 显示的好看一点\n$/usr/local/bin/sed -n -e '/Whim/!h' -e '/Whim/{H;x;s/\\n/:/;p}' source2.txt \nHakim El Hattab:Whim\n\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">拷贝保持空间到模式空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 还是前面的需求.g拷贝保持空间到模式空间\n$/usr/local/bin/sed  -n -e '/Whim/!h' -e '/Whim/{g;p}' source2.txt   \nHakim El Hattab\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">增加保持空间到模式空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable> \n# 前面的前面, 输出是Hakim El Hattab:Whim 怎么样翻转呢？\n# G就是反向的\n$/usr/local/bin/sed -n -e '/Whim/!h' -e '/Whim/{G;s/\\n/:/;p}' source2.txt  \nWhim:Hakim El Hattab\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">增加下一行到模式空间</h2>\n\t\t\t\t\t\t<pre><code contenteditable> \n$/usr/local/bin/sed -e '{N;s/\\n/:/}' source2.txt\nIan Bicking:Mozilla\nHakim El Hattab:Whim\nPaul Irish:Google\nChris Wanstrath:Github\nMattt Thompson:Heroku\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">label</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 给匹配Github的行,在使用名字:公司的前面加一个*, \n#只有匹配Github的模式空间和保持空间才会执行s/^/*/\n$cat label.sed \n#!/usr/local/bin/sed -nf\nh;n;H;x\ns/\\n/:/\n/Github/!b end\ns/^/*/\n:end p\n$chmod u+x label.sed\n./label.sed source2.txt\nIan Bicking:Mozilla\nHakim El Hattab:Whim\nPaul Irish:Google\n*Chris Wanstrath:Github\nMattt Thompson:Heroku\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 把mac地址的冒号替换掉\n\"130531170341903612\",\"259594\",2013-05-31T09:04:25Z,\"1c:b0:94:b2:85:bd\"\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">sed \"s/\\([0-9a-zA-Z]\\{2\\}\\):\\([0-9a-zA-Z]\\{2\\}\\):\\([0-9a-zA-Z]\\{2\\}\\):\\([0-9a-zA-Z]\\{2\\}\\):\\([0-9a-zA-Z]\\{2\\}\\):\\([0-9a-zA-Z]\\{2\\}\\)/\\1\\2\\3\\4\\5\\6/\"</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">sed \"s/\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\)/\\1\\2\\3\\4\\5\\6/\"</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">sed -e \"s/T\\(.*\\):\\(.*\\):\\(.*\\)Z/\\1#\\2#\\3/\" -e \"s/://g\" -e \"s/#/:/g\"</li>\n\t\t\t\t\t</ol>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen dongwmcsm\">(三)awk</h2>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">学完本章的后果</h2>\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">获取来连接mongodb的各服务器产生的连接数</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">获取nginx日志ip访问数在一个小时里面,从多到少的总次数排行(排行用到了sort)</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">打印question_awk3.txt包含Addy和Mattt之间的行</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">不使用sort过滤重复行</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">将2个文件合并成一行,但username不一定在2个文件同一行</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">输出2个文件1中有,2中没有的行</li>\n\t\t\t\t\t\t<li class=\"fragment dongwmcsm\">这是什么意思: gawk -vcmd='ls -l' 'BEGIN{while ( (cmd | getline var) > 0) {print var} close(cmd)}'</li>\n\t\t\t\t\t</ol>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">语法1</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nawk -Fs '/pattern/ {action}' input-file\n#or\nawk -Fs '{action}' intput-file\n# -F表示设置分隔符,不指定就是默认为空字符\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 用:分割，查找匹配mail的行并且打印冒号分割后的第一部分\nawk -F: '/mail/ {print $1}' /etc/passwd\n_mailman\n_clamav\n_amavisd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">awk数据结构</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 1 BEGIN { awk-commands } 在执行awk body之前执行这个awk-commands,而且只一次\n# 2 /pattern/ {action} body部分，也就是awk要执行的主体,比如十行,那么这个主体就调用10次\n# 3 END { awk-commands } 在执行完body之后执行,也是只一次\n$awk 'BEGIN { FS=\":\";print \"---header---\" } /mail/ {print $1} \\\nEND { print \"---footer---\"}' /etc/passwd\n---header---\n_mailman\n_clamav\n_amavisd\n---footer---\n# 当然可以只有其中一种或者集中数据结构\nawk -F: 'BEGIN { print \"UID\"} { print $3 }' /etc/passwd |\\\nsed -e '/^$/ d'|head -2\nUID\n-2\n$ awk 'BEGIN { print \"Hello World!\" }'\nHello World!\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">源码2</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 这是一个文件,分别是id, 描述, 价钱和库存\n$cat items.txt \n101,HD Camcorder,Video,210,10\n102,Refrigerator,Appliance,850,2\n103,MP3 Player,Audio,270,15\n104,Tennis Racket,Sports,190,20\n105,Laser Printer,Office,475,5\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">源码3</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 这是一个销售数据,分别是id和1-6月的销售情况\n$cat items-sold.txt\n101 2 10 5 8 10 12\n102 0 1 4 3 0 2\n103 10 6 11 20 5 13\n104 2 3 4 0 6 5\n105 10 2 5 7 12 6\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">print</h2>\n\t\t\t\t\t\t<pre><code contenteditable> \n# 默认print就是打印文件全文到终端\n$awk '{print}' source.txt\n# 下面是通过,分割,输出第二段。$0表示全行,类似shell用法\n$awk -F ',' '{print $2}' source.txt\nIan Bicking\nHakim El Hattab\nPaul Irish\nAddy Osmani\nChris Wanstrath\nMattt Thompson\nAsk Solem Hoel\n# or\n$awk -F \",\" '{print $2}' source.txt\n$awk -F, '{print $2}' source.txt\n# 一个格式化更好看些的效果\nawk -F ',' 'BEGIN \\                         \n{ print \"-------------\\nName\\tComp\\n-------------\"} \\\n{ print $2,\"\\t\",$3;} \\  \nEND { print \"-------------\"; }' source.txt \n-------------\nName\tComp\n-------------\nIan Bicking \t Mozilla\nHakim El Hattab \t Whim\nPaul Irish \t Google\nAddy Osmani \t Google\nChris Wanstrath \t Github\nMattt Thompson \t Heroku\nAsk Solem Hoel \t VMware\n-------------\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">模式匹配</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 用逗号做分隔符, 打印第二和第三列\n$awk -F ',' '/Whim/ {print $2, $3}' source.txt\nHakim El Hattab Whim\n# 可以加点格式化语句\n$awk -F ',' '/Whim/ {print \"Whim\\\"s name:\", $2}' source.txt\nWhim\"s name: Hakim El Hattab\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - FS</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$awk -F ',' '{print $2, $3}' source.txt  \nIan Bicking Mozilla\nHakim El Hattab Whim\nPaul Irish Google\nAddy Osmani Google\nChris Wanstrath Github\nMattt Thompson Heroku\nAsk Solem Hoel VMware\n# 可以使用内置的FS - 输入字段分隔符 实现相同的功能\n$awk 'BEGIN {FS=\",\"} {print $2, $3}' source.txt\n# 先看一个文件\n$cat source-multiple-fs.txt \n101,Ian Bicking:Mozilla%\n102,Hakim El Hattab:Whim%\n103,Paul Irish:Google%\n104,Addy Osmani:Google%\n105,Chris Wanstrath:Github%\n106,Mattt Thompson:Heroku%\n107,Ask Solem Hoel:VMware%\n# 发现上面的分隔符有三种:逗号分号和百分号,这样就可以这样使用\n# awk 'BEGIN {FS=\"[,:%]\"} {print $2, $3}' source-multiple-fs.txt\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - OFS</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$awk -F ',' '{print $2, \":\", $3}' source.txt \nIan Bicking : Mozilla\nHakim El Hattab : Whim\nPaul Irish : Google\nAddy Osmani : Google\nChris Wanstrath : Github\nMattt Thompson : Heroku\nAsk Solem Hoel : VMware\n# 其实可以用内置的OFS - 输出字段分隔符\n$awk -F ',' 'BEGIN { OFS=\":\" } { print $2, $3 }' source.txt\n\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - RS</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$cat source-one-line.txt \n1,one:2,two:3,three:4,four\n# 现在我想分割成(1，one),(2, two)这样的效果\n$awk -F, '{print $2}' source-one-line.txt \none:2\n# 这个没有实现我想要的效果\n# 使用RS - 记录分隔符, 他能帮你把单行内容先分割然后再按-F分割\n$awk -F, 'BEGIN { RS=\":\" } { print $2 }' source-one-line.txt\none\ntwo\nthree\nfour\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - ORS</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# RS是输入, ORS就是输出\n$awk 'BEGIN { FS=\",\"; OFS=\"\\n\";ORS=\"\\n---\\n\" } \\\n{print $1,$2,$3}' source.txt|head -8\n101\nIan Bicking\nMozilla\n---\n102\nHakim El Hattab\nWhim\n---\t\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - NR</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# NR是记录的数目\n$awk 'BEGIN {FS=\",\"} \\\n{print \"Emp Id of record number\",NR,\"is\",$1;} \\\nEND {print \"Total number of records:\",NR}' source.txt\nEmp Id of record number 1 is 101\nEmp Id of record number 2 is 102\nEmp Id of record number 3 is 103\nEmp Id of record number 4 is 104\nEmp Id of record number 5 is 105\nEmp Id of record number 6 is 106\nEmp Id of record number 7 is 107\nTotal number of records: 7\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk内置变量 - FILENAME,FNR</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# FILENAME显示了当前文件, FNR关联到当前文件的记录数\nawk 'BEGIN {FS=\",\"} \\\n{print FILENAME \": record number\",FNR,\"is\",$1;} \\\nEND {print \"Total number of records:\",NR}' \\\nsource.txt source-multiple-fs.txt\nsource.txt: record number 1 is 101\nsource.txt: record number 2 is 102\nsource.txt: record number 3 is 103\nsource.txt: record number 4 is 104\nsource.txt: record number 5 is 105\nsource.txt: record number 6 is 106\nsource.txt: record number 7 is 107\nsource-multiple-fs.txt: record number 1 is 101\nsource-multiple-fs.txt: record number 2 is 102\nsource-multiple-fs.txt: record number 3 is 103\nsource-multiple-fs.txt: record number 4 is 104\nsource-multiple-fs.txt: record number 5 is 105\nsource-multiple-fs.txt: record number 6 is 106\nsource-multiple-fs.txt: record number 7 is 107\nTotal number of records: 14\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">awk变量</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 变量支持数字,字符和下划线\n# 这个文件多加了一列star数, 现在我想统计整个文件的star\n$cat source-star.txt\n101,Ian Bicking,Mozilla,1204\n102,Hakim El Hattab,Whim,4029\n103,Paul Irish,Google,7200\n104,Addy Osmani,Google,2201\n105,Chris Wanstrath,Github,1002\n106,Mattt Thompson,Heroku,890\n107,Ask Solem Hoel,VMware,2109\n# 使用awk的变量,在begin的时候声明total,在body体里面\n# 累加total值，在end里面打印\n$cat total-star.awk \nBEGIN {\n    FS=\",\";\n    total=0; }\n{\n print $2 \"'s star is: \" $4;\n total=total+$4\n} END {\n    print \"---\\nTotal star = *\"total;\n}\nawk -f total-star.awk source-star.txt\nIan Bicking's star is: 1204\nHakim El Hattab's star is: 4029\nPaul Irish's star is: 7200\nAddy Osmani's star is: 2201\nChris Wanstrath's star is: 1002\nMattt Thompson's star is: 890\nAsk Solem Hoel's star is: 2109\n---\nTotal star = *18635\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">自增长/减少</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 可以使用++或者--,但是注意前后\n$awk -F, '{print --$4}' source-star.txt\n1203\n4028\n7199\n2200\n1001\n889\n2108\n$awk -F, '{print $4--}' source-star.txt \n# 咦 竟然没有变\n1204\n4029\n7200\n2201\n1002\n890\n2109\n# 想达到--$4的目的就得这样\n$awk -F ',' '{$4--; print $4}' source-star.txt\n1203\n4028\n7199\n2200\n1001\n889\n2108\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">字符串操作</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$cat string.awk\nBEGIN {\n    FS=\",\";\n    OFS=\",\";\n    string1=\"GO\";\n    string2=\"OGLE\";\n    numberstring=\"100\";\n    string3=string1 string2;\n    print \"Concatenate string is:\" string3;\n    numberstring=numberstring+1;\n    print \"String to number:\" numberstring;\n}\n# 字符串会直接相连, 字符串相加会自动转化成数字相加\n$awk -f string.awk \nConcatenate string is:GOOGLE\nString to number:101\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">复合运算</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$cat assignment.awk\nBEGIN {\n FS=\",\";\n OFS=\",\";\n total1 = total2 = total3 = total4 = total5 = 10;\n total1 += 5; print total1;\n total2 -= 5; print total2;\n total3 *= 5; print total3;\n total4 /= 5; print total4;\n total5 %= 5; print total5;\n}\n$awk -f assignment.awk\n15\n5\n50\n2\n0\t\t\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">比较操作</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 只会显示小于1005的行\n$awk -F \",\" '$4 <= 1005' source-star.txt\n105,Chris Wanstrath,Github,1002\n106,Mattt Thompson,Heroku,890\n$awk -F \",\" '$1 == 103 {print $2}' source-star.txt \nPaul Irish\n# 你也可以加多个条件 这里||表示或者  && 表示和\n$awk -F \",\" '$4 > 3000 || $4 <= 880 {print $2}' source-star.txt\nHakim El Hattab\nPaul Irish\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen\">正则</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# ~ 表示匹配, ！~ 表示不匹配\n$awk -F \",\" '$3 ~ \"Github\"' source.txt\n105,Chris Wanstrath,Github\n$awk -F \",\" '$3 !~ \"Google\"' source.txt\n101,Ian Bicking,Mozilla\n102,Hakim El Hattab,Whim\n105,Chris Wanstrath,Github\n106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware\n# NF是分割项数目, $NF表示最后一个分割项, 这里是找最后一个分割项是/bin/sh的就会累加n\n$awk -F ':' '$NF ~ /\\/bin\\/sh/ { n++ }; END { print n \\\n}' /etc/passwd\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">if语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nif (conditional-expression)\n    action\n\t\nif (conditional-expression)\n{\naction1;\naction2; }\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 和上面的一个例子一样\n$awk -F \",\" '{ if ($3 ~ \"Github\") print $0}' source.txt\n105,Chris Wanstrath,Github\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">if else语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nif (conditional-expression)\n    action1\nelse\n    action2\n# or\nconditional-expression ? action1 : action2 ;\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 打印单行因为%2,奇数取余\n$awk 'ORS=NR%2?\",\":\"\\n\"' source.txt                    \n101,Ian Bicking,Mozilla,102,Hakim El Hattab,Whim\n103,Paul Irish,Google,104,Addy Osmani,Google\n105,Chris Wanstrath,Github,106,Mattt Thompson,Heroku\n107,Ask Solem Hoel,VMware,\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">while语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nwhile(condition)\n    actions\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 把第二列和其之后的每列加起来\n$cat while.awk \n{\n    i=2; total=0;\n    while (i <= NF) {\n        total = total + $i;\n        i++;\n }\n    print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n$awk -f while.awk items-sold.txt\nItem 101 : 47 quantities sold\nItem 102 : 10 quantities sold\nItem 103 : 65 quantities sold\nItem 104 : 20 quantities sold\nItem 105 : 42 quantities sold\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">do while语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# do while至少会执行一次\ndo\naction\nwhile(condition)\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 用do-while方法实现上一次的例子\n$cat dowhile.awk \n{\n    i=2; total=0;\n do\n {\n     total = total + $i;\n     i++;\n } while (i <= NF)\n print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n$awk -f dowhile.awk items-sold.txt\nItem 101 : 47 quantities sold\nItem 102 : 10 quantities sold\nItem 103 : 65 quantities sold\nItem 104 : 20 quantities sold\nItem 105 : 42 quantities sold\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">for语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nfor(initialization;condition;increment/decrement)\nactions\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$echo \"1 2 3 4\" | awk '{ for (i = 1; i <= NF; i++) total = total+$i }; \\\nEND { print total }'  \n10\n# 再来个for版本的例子\n$cat for.awk \n{\n    total=0;\n    for (i=2; i <= NF; i++)\n        total = total + $i;\n    print \"Item\", $1, \":\", total, \"quantities sold\";\n}\n$awk -f for.awk items-sold.txt\nItem 101 : 47 quantities sold\nItem 102 : 10 quantities sold\nItem 103 : 65 quantities sold\nItem 104 : 20 quantities sold\nItem 105 : 42 quantities sold\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">break,continue,exit</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 程序一直运行打印Iteration,并且累加x,直到x等于10停止程序-break\n$ awk 'BEGIN{\nx=1;\nwhile(1)\n{\nprint \"Iteration\";\nif ( x==10 )\nbreak;\nx++;\n}}'\n# x从1到10, 如果x等于5 直接直接累加x而不打印\n$awk 'BEGIN{\nx=1;\nwhile(x<=10)\n{\nif(x==5){\nx++;\ncontinue;\n}\nprint \"Value of x\",x;x++;\n}\n}'\n# x从1到10,当x等于5的时候程序直接退出\n$awk 'BEGIN{\nx=1;\nwhile(x<=10)\n{\nif(x==5){\nexit;}\nprint \"Value of x\",x;x++;\n}\n}'\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">关联数组</h3>\n\t\t\t\t\t\t<pre><code contenteditable>\n# awk 的关联数组中item[101]和item[\"101\"]意义一样\n$awk 'BEGIN { item[101]=\"Github\"; print item[\"101\"]}' \nGithub\n# 可以用in检验是否包含本项\n$awk 'BEGIN { item[101]=\"a\"; if ( 101 in item ) print \"Has 101\"}'\nHas 101\n# 还可以使用for循环读取列表\n$cat array-for-loop.awk\nBEGIN {\n    item[101]=\"Github\";\n    item[21]=\"Google\";\n    for (x in item)\n        print item[x];\n}\n$awk -f array-for-loop.awk\nGithub\nGoogle\n# 多维数组, delete可以删除元素.PS item[2,1]这样的格式有问题\n# 因为会被翻译成2#2(\"2\\0342\"),假设要设置分隔符可以使用SUBSEP=\",\";\n$awk 'BEGIN { item[\"1,1\"]=\"Github\"; item[\"1,2\"]=\"Google\"; \\\nitem[\"2,1\"]=\"Whim\"; delete item[\"2,1\"];\nfor (x in item)\nprint \"Index\",x,\"contains\",item[x];}'\nIndex 1,1 contains Github\nIndex 1,2 contains Google\n\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">数组排序</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 这里需要gnu awk了 使用了asort排序\n$cat asort.awk \nBEGIN {\n item[101]=\"Github\";\n item[22]=\"Whim\";\n item[50]=\"Google\";\n print \"------Before asort------\"\n for (x in item)\n     print \"Index\",x,\"contains\",item[x];\n total = asort(item);\n print \"------After asort------\"\n for (x in item)\n     print \"Index\",x,\"contains\",item[x];\n}\n\n$gawk -f asort.awk\n------Before asort------\nIndex 22 contains Whim\nIndex 50 contains Google\nIndex 101 contains Github\n------After asort------\nIndex 1 contains Github\nIndex 2 contains Google\nIndex 3 contains Whim\n# 大家请注意上面的例子,排序后已经忘记了原来item的index位置\n# 而asorti可以帮助你记录这个位置\n$cat asorti.awk\nBEGIN {\n item[101]=\"Github\";\n item[22]=\"Whim\";\n item[50]=\"Google\";\n print \"----- Function: asort -----\"\n total = asort(item,itemdesc);\n for (i=1; i<= total; i++)\n    print \"Index\",i,\"contains\",itemdesc[i];\n print \"----- Function: asorti -----\"\n total = asorti(item,itemabbr);\n for (i=1; i<= total; i++)\n     print \"Index\",i,\"contains\",itemabbr[i];\n}\n$gawk -f asorti.awk\n----- Function: asort -----\nIndex 1 contains Github\nIndex 2 contains Google\nIndex 3 contains Whim\n----- Function: asorti -----\nIndex 1 contains 101\nIndex 2 contains 22\nIndex 3 contains 50\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">格式化打印</h2>\n\t\t\t\t\t\t\t<pre><code contenteditable>\n# \\n是换行\n$awk 'BEGIN { printf \"Line 1\\nLine 2\\n\" }'\nLine 1\nLine 2\n# \\t是tab\n$awk 'BEGIN \\\n{ printf \"Field 1\\t\\tField 2\\tField 3\\tField 4\\n\" }'\nField 1\t\tField 2\tField 3\tField 4\n# \\v是垂直tab\n$awk 'BEGIN \\\n{ printf \"Field 1\\vField 2\\vField 3\\vField 4\\n\" }'\nField 1\n    Field 2\n       Field 3\n\t  Field 4\n# %s字符串; %c单个字符; %d数字; %f浮点数......\n$cat printf-width.awk \nBEGIN {\nFS=\",\"\nprintf \"%3s\\t%10s\\t%10s\\t%5s\\t%3s\\n\",\n    \"Num\",\"Description\",\"Type\",\"Price\",\"Qty\"\nprintf \"-----------------------------------------------------\\n\"\n}\n{\n    printf \"%3d\\t%10s\\t%10s\\t%g\\t%d\\n\", $1,$2,$3,$4,$5\n}\nawk -f printf-width.awk items.txt \nNum\tDescription\t      Type\tPrice\tQty\n-----------------------------------------------------\n101\tHD Camcorder\t     Video\t210\t10\n102\tRefrigerator\t Appliance\t850\t2\n103\tMP3 Player\t     Audio\t270\t15\n104\tTennis Racket\t    Sports\t190\t20\n105\tLaser Printer\t    Office\t475\t5\n\t\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">内置函数</h2>\n\t\t\t\t\t\t\t<pre><code contenteditable>\n# int - 将数字转换成整形, 类似的函数还有sqrt, sin, cos...\n$awk 'BEGIN {print int(4.1);print int(-6.22);print int(strings)}'\n4\n-6\n0\n# rand - 随机0-1的数字; srand -初始化随机数的初始值\n$cat srand.awk \nBEGIN {\n    srand(5);\n    count=0;\n    max=30;\n    while (count < 5) {\n        # 随机数范围为5-30\n        rnd = int(rand() * max);\n        print rnd;\n        count++;\n    }\n}\n# 使用osx的awk随机范围不对\n$gawk -f srand.awk\n19\n9\n21\n8\n13\n# index - 所查字符在字符串中的位置,没找到会返回0\nawk 'BEGIN{str=\"This is a test\"; print index(str, \"a\"); print index(str, \"y\")}'\n9\n0\n# length - 字符串的长度\n$awk -F, '{print length($0)}' source.txt\n23\n24\n21\n22\n26\n25\n25\n# split - 分片 PS:使用awk分片的顺序有问题;\n# split第一个参数是要分割的内容,第二个是分割后的结果保存的数组,第三个是使用的分隔符\n$echo \"101 arg1:arg2:arg3\"|gawk '{split($2,out,\":\"); for (x in out) print out[x];}'\narg1\narg2\narg3\n# substr - 取字符串范围内容;\n# 第一个参数是要取的内容, 第二个是开始位置(从1开始),第三个是要取的长度\n$echo \"This is test\"|awk '{print substr($3,2,2);}'\nes\n# sub - 替换原来的字符串,但是只替换第一个符合项; gsub - 替换全部选择项\n$awk 'BEGIN{str=\"ThIs is test\"; sub(\"[Ii]s\",\"e\", str); print str;}'\nThe is test\n$awk 'BEGIN{str=\"ThIs is test\"; gsub(\"[Ii]s\",\"e\", str); print str;}'\nThe e test\n# match - 返回某子字符串是否匹配了某字符串;\n# RSTART - awk 自带变量返回匹配的开始位置\n# RLENGTH - awk 自带变量返回匹配串的长度\n$awk 'BEGIN{str=\"This is test\"; if (match(str, \"test\")) {print substr(str,RSTART,RLENGTH)}}'  \n# tolower/toupper - 把字符串都变成小写/大写\n$awk 'BEGIN{str=\"This is test\"; print tolower(str); print toupper(str);}'\nthis is test\nTHIS IS TEST\n# ARGC - 参数的数量; ARGV参数的数组\n$cat arguments.awk\nBEGIN {\n    print \"ARGC=\",ARGC\n    for (i = 0; i < ARGC; i++)\n  print ARGV[i]\n}\n\t\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">内置变量</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# ENVIRON - 系统环境变量\n$cat environ.awk\nBEGIN {\n OFS=\"=\"\n for(x in ENVIRON)\n     print x,ENVIRON[x];\n}\n# IGNORECASE - 设置为1 忽略大小写\n$gawk 'BEGIN{IGNORECASE=1} /github/{print}' source.txt\n105,Chris Wanstrath,Github\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">位运算</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n$cat bits.awk\nBEGIN {\n number1=15\n number2=25\n print \"AND: \" and(number1,number2);\n print \"OR: \" or(number1,number2)\n print \"XOR: \" xor(number1,number2)\n print \"LSHIFT: \" lshift(number1,2)\n print \"RSHIFT: \" rshift(number1,2)\n}\n$gawk -f bits.awk\nAND: 9\nOR: 31\nXOR: 22\nLSHIFT: 60\nRSHIFT: 3\t\t\t\t\t\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t\t<section>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">自定义函数语法</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\nfunction fn-name(parameters)\n{\n function-body\n}\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen\">例子</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 函数的位置不重要\n$cat function-debug.awk \nfunction mydebug (message) {\n    print (\"Debug Time:\" strftime(\"%a %b %d %H:%M:%S %Z %Y\", systime()))\n    print (message)\n}\n{\n    mydebug($NF)\n}\n$gawk -f function-debug.awk source.txt\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nBicking,Mozilla\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nHattab,Whim\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nIrish,Google\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nOsmani,Google\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nWanstrath,Github\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nThompson,Heroku\nDebug Time:Wed Dec 11 22:14:43 CST 2013\nHoel,VMware\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">系统调用</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# 使用system函数可以调用shell命令\n$awk 'BEGIN { system(\"date\") }'\nWed Dec 11 22:24:27 CST 2013\n# systime 和 strftime上面见过了.处理时间和格式化时间\n$gawk 'BEGIN { print strftime(\"%c\",systime()) }'\nWed Dec 11 22:25:32 2013\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h2 class=\"dongwmtitle dongwmgreen dongwmcsm\">(四)awk高级话题</h2>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h3 class=\"dongwmtitle dongwmgreen dongwmcsm\">getline</h2>\n\t\t\t\t\t\t<pre><code contenteditable>\n# awk首先读入一行，接着处理getline函数再获得一行....下面显示的就是奇数行\n$awk -F\",\" '{print $0;getline;}' source.txt \n101,Ian Bicking,Mozilla\n103,Paul Irish,Google\n105,Chris Wanstrath,Github\n107,Ask Solem Hoel,VMware\n# 我们使用getline 并把这行变量赋值给tmp\n$awk -F, '{getline tmp; print \"$0->\", $0; print \"tmp->\", tmp;}' source.txt\n$0-> 101,Ian Bicking,Mozilla\ntmp-> 102,Hakim El Hattab,Whim\n$0-> 103,Paul Irish,Google\ntmp-> 104,Addy Osmani,Google\n$0-> 105,Chris Wanstrath,Github\ntmp-> 106,Mattt Thompson,Heroku\n$0-> 107,Ask Solem Hoel,VMware\ntmp-> 106,Mattt Thompson,Heroku\n# 执行外部程序, close可关闭管道,比如这里必须是`|getline`之前的命令\n$awk 'BEGIN{\"date\"| getline;close(\"date\");print \"Timestamp:\" $0}'\nTimestamp:Wed Dec 11 22:41:52 CST 2013\n# or\n$awk 'BEGIN{\"date\"| getline timestamp;close(\"date\");print \"Timestamp:\" timestamp}'\nTimestamp:Wed Dec 11 22:44:08 CST 2013\n\t\t\t\t\t\t</code></pre>\n\t\t\t\t</section>\n\t\t\t\t<section>\n\t\t\t\t\t<h1 class=\"exclusive\">「谢谢」</h1>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<script src=\"lib/js/head.min.js\"></script>\n\t\t<script src=\"js/reveal.min.js\"></script>\n\n\t\t<script>\n\t\t\tReveal.initialize({\n\t\t\t\tcontrols: true,\n\t\t\t\tprogress: true,\n\t\t\t\thistory: true,\n\t\t\t\tcenter: true,\n\n\t\t\t\ttheme: Reveal.getQueryHash().theme,\n\t\t\t\ttransition: Reveal.getQueryHash().transition || 'default',\n\t\t\t\tdependencies: [\n\t\t\t\t\t{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },\n\t\t\t\t\t{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },\n\t\t\t\t\t{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },\n\t\t\t\t]\n\t\t\t});\n\n\t\t</script>\n\n\t</body>\n</html>\n"
  },
  {
    "path": "lib/css/zenburn.css",
    "content": "/*\n\nZenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>\nbased on dark.css by Ivan Sagalaev\n\n*/\n\npre code {\n  display: block; padding: 0.5em;\n  background: #3F3F3F;\n  color: #DCDCDC;\n}\n\npre .keyword,\npre .tag,\npre .django .tag,\npre .django .keyword,\npre .css .class,\npre .css .id,\npre .lisp .title {\n  color: #E3CEAB;\n}\n\npre .django .template_tag,\npre .django .variable,\npre .django .filter .argument {\n  color: #DCDCDC;\n}\n\npre .number,\npre .date {\n  color: #8CD0D3;\n}\n\npre .dos .envvar,\npre .dos .stream,\npre .variable,\npre .apache .sqbracket {\n  color: #EFDCBC;\n}\n\npre .dos .flow,\npre .diff .change,\npre .python .exception,\npre .python .built_in,\npre .literal,\npre .tex .special {\n  color: #EFEFAF;\n}\n\npre .diff .chunk,\npre .ruby .subst {\n  color: #8F8F8F;\n}\n\npre .dos .keyword,\npre .python .decorator,\npre .class .title,\npre .haskell .label,\npre .function .title,\npre .ini .title,\npre .diff .header,\npre .ruby .class .parent,\npre .apache .tag,\npre .nginx .built_in,\npre .tex .command,\npre .input_number {\n    color: #efef8f;\n}\n\npre .dos .winutils,\npre .ruby .symbol,\npre .ruby .symbol .string,\npre .ruby .symbol .keyword,\npre .ruby .symbol .keymethods,\npre .ruby .string,\npre .ruby .instancevar {\n  color: #DCA3A3;\n}\n\npre .diff .deletion,\npre .string,\npre .tag .value,\npre .preprocessor,\npre .built_in,\npre .sql .aggregate,\npre .javadoc,\npre .smalltalk .class,\npre .smalltalk .localvars,\npre .smalltalk .array,\npre .css .rules .value,\npre .attr_selector,\npre .pseudo,\npre .apache .cbracket,\npre .tex .formula {\n  color: #CC9393;\n}\n\npre .shebang,\npre .diff .addition,\npre .comment,\npre .java .annotation,\npre .template_comment,\npre .pi,\npre .doctype {\n  color: #7F9F7F;\n}\n\npre .xml .css,\npre .xml .javascript,\npre .xml .vbscript,\npre .tex .formula {\n  opacity: 0.5;\n}\n\n"
  },
  {
    "path": "lib/font/league_gothic_license",
    "content": "SIL Open Font License (OFL)\nhttp://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL\n"
  },
  {
    "path": "lib/js/classList.js",
    "content": "/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/\nif(typeof document!==\"undefined\"&&!(\"classList\" in document.createElement(\"a\"))){(function(j){var a=\"classList\",f=\"prototype\",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\\s+|\\s+$/g,\"\")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===\"\"){throw new n(\"SYNTAX_ERR\",\"An invalid or illegal string was specified\")}if(/\\s/.test(o)){throw new n(\"INVALID_CHARACTER_ERR\",\"String contains an invalid character\")}return c.call(p,o)},d=function(s){var r=k.call(s.className),q=r?r.split(/\\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.className=this.toString()}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){return this[o]||null};e.contains=function(o){o+=\"\";return g(this,o)!==-1};e.add=function(o){o+=\"\";if(g(this,o)===-1){this.push(o);this._updateClassName()}};e.remove=function(p){p+=\"\";var o=g(this,p);if(o!==-1){this.splice(o,1);this._updateClassName()}};e.toggle=function(o){o+=\"\";if(g(this,o)===-1){this.add(o)}else{this.remove(o)}};e.toString=function(){return this.join(\" \")};if(b.defineProperty){var l={get:i,enumerable:true,configurable:true};try{b.defineProperty(m,a,l)}catch(h){if(h.number===-2146823252){l.enumerable=false;b.defineProperty(m,a,l)}}}else{if(b[f].__defineGetter__){m.__defineGetter__(a,i)}}}(self))};"
  },
  {
    "path": "lib/js/html5shiv.js",
    "content": "document.createElement('header');\ndocument.createElement('nav');\ndocument.createElement('section');\ndocument.createElement('article');\ndocument.createElement('aside');\ndocument.createElement('footer');\ndocument.createElement('hgroup');"
  },
  {
    "path": "plugin/highlight/highlight.js",
    "content": "// START CUSTOM REVEAL.JS INTEGRATION\n[].slice.call( document.querySelectorAll( 'pre code' ) ).forEach( function( element ) {\n\telement.addEventListener( 'focusout', function( event ) {\n\t\thljs.highlightBlock( event.currentTarget );\n\t}, false );\n} );\n// END CUSTOM REVEAL.JS INTEGRATION\n\n\n/*\nSyntax highlighting with language autodetection.\nhttp://softwaremaniacs.org/soft/highlight/\n*/\nvar hljs=new function(){function m(p){return p.replace(/</gm,\"&lt;\")}function c(r,q,p){return RegExp(q,\"m\"+(r.cI?\"i\":\"\")+(p?\"g\":\"\"))}function j(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName==\"CODE\"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\\s+/))){break}}}function g(t,s){var r=\"\";for(var q=0;q<t.childNodes.length;q++){if(t.childNodes[q].nodeType==3){var p=t.childNodes[q].nodeValue;if(s){p=p.replace(/\\n/g,\"\")}r+=p}else{if(t.childNodes[q].nodeName==\"BR\"){r+=\"\\n\"}else{r+=g(t.childNodes[q])}}}if(/MSIE [678]/.test(navigator.userAgent)){r=r.replace(/\\r/g,\"\\n\")}return r}function a(s){var q=s.className.split(/\\s+/);q=q.concat(s.parentNode.className.split(/\\s+/));for(var p=0;p<q.length;p++){var r=q[p].replace(/^language-/,\"\");if(d[r]||r==\"no-highlight\"){return r}}}function b(p){var q=[];(function(s,t){for(var r=0;r<s.childNodes.length;r++){if(s.childNodes[r].nodeType==3){t+=s.childNodes[r].nodeValue.length}else{if(s.childNodes[r].nodeName==\"BR\"){t+=1}else{q.push({event:\"start\",offset:t,node:s.childNodes[r]});t=arguments.callee(s.childNodes[r],t);q.push({event:\"stop\",offset:t,node:s.childNodes[r]})}}}return t})(p,0);return q}function l(y,z,x){var r=0;var w=\"\";var t=[];function u(){if(y.length&&z.length){if(y[0].offset!=z[0].offset){return(y[0].offset<z[0].offset)?y:z}else{return z[0].event==\"start\"?y:z}}else{return y.length?y:z}}function s(C){var D=\"<\"+C.nodeName.toLowerCase();for(var A=0;A<C.attributes.length;A++){var B=C.attributes[A];D+=\" \"+B.nodeName.toLowerCase();if(B.nodeValue!=undefined&&B.nodeValue!=false&&B.nodeValue!=null){D+='=\"'+m(B.nodeValue)+'\"'}}return D+\">\"}while(y.length||z.length){var v=u().splice(0,1)[0];w+=m(x.substr(r,v.offset-r));r=v.offset;if(v.event==\"start\"){w+=s(v.node);t.push(v.node)}else{if(v.event==\"stop\"){var q=t.length;do{q--;var p=t[q];w+=(\"</\"+p.nodeName.toLowerCase()+\">\")}while(p!=v.node);t.splice(q,1);while(q<t.length){w+=s(t[q]);q++}}}}w+=x.substr(r);return w}function i(){function p(u,t,v){if(u.compiled){return}if(!v){u.bR=c(t,u.b?u.b:\"\\\\B|\\\\b\");if(!u.e&&!u.eW){u.e=\"\\\\B|\\\\b\"}if(u.e){u.eR=c(t,u.e)}}if(u.i){u.iR=c(t,u.i)}if(u.r==undefined){u.r=1}if(u.k){u.lR=c(t,u.l||hljs.IR,true)}for(var s in u.k){if(!u.k.hasOwnProperty(s)){continue}if(u.k[s] instanceof Object){u.kG=u.k}else{u.kG={keyword:u.k}}break}if(!u.c){u.c=[]}u.compiled=true;for(var r=0;r<u.c.length;r++){p(u.c[r],t,false)}if(u.starts){p(u.starts,t,false)}}for(var q in d){if(!d.hasOwnProperty(q)){continue}p(d[q].dM,d[q],true)}}function e(J,D){if(!i.called){i();i.called=true}function z(r,M){for(var L=0;L<M.c.length;L++){if(M.c[L].bR.test(r)){return M.c[L]}}}function w(L,r){if(C[L].e&&C[L].eR.test(r)){return 1}if(C[L].eW){var M=w(L-1,r);return M?M+1:0}return 0}function x(r,L){return L.iR&&L.iR.test(r)}function A(O,N){var M=[];for(var L=0;L<O.c.length;L++){M.push(O.c[L].b)}var r=C.length-1;do{if(C[r].e){M.push(C[r].e)}r--}while(C[r+1].eW);if(O.i){M.push(O.i)}return c(N,\"(\"+M.join(\"|\")+\")\",true)}function s(M,L){var N=C[C.length-1];if(!N.t){N.t=A(N,H)}N.t.lastIndex=L;var r=N.t.exec(M);if(r){return[M.substr(L,r.index-L),r[0],false]}else{return[M.substr(L),\"\",true]}}function p(O,r){var L=H.cI?r[0].toLowerCase():r[0];for(var N in O.kG){if(!O.kG.hasOwnProperty(N)){continue}var M=O.kG[N].hasOwnProperty(L);if(M){return[N,M]}}return false}function F(M,O){if(!O.k){return m(M)}var N=\"\";var P=0;O.lR.lastIndex=0;var L=O.lR.exec(M);while(L){N+=m(M.substr(P,L.index-P));var r=p(O,L);if(r){t+=r[1];N+='<span class=\"'+r[0]+'\">'+m(L[0])+\"</span>\"}else{N+=m(L[0])}P=O.lR.lastIndex;L=O.lR.exec(M)}N+=m(M.substr(P,M.length-P));return N}function K(r,M){if(M.sL&&d[M.sL]){var L=e(M.sL,r);t+=L.keyword_count;return L.value}else{return F(r,M)}}function I(M,r){var L=M.cN?'<span class=\"'+M.cN+'\">':\"\";if(M.rB){q+=L;M.buffer=\"\"}else{if(M.eB){q+=m(r)+L;M.buffer=\"\"}else{q+=L;M.buffer=r}}C.push(M);B+=M.r}function E(O,L,Q){var R=C[C.length-1];if(Q){q+=K(R.buffer+O,R);return false}var M=z(L,R);if(M){q+=K(R.buffer+O,R);I(M,L);return M.rB}var r=w(C.length-1,L);if(r){var N=R.cN?\"</span>\":\"\";if(R.rE){q+=K(R.buffer+O,R)+N}else{if(R.eE){q+=K(R.buffer+O,R)+N+m(L)}else{q+=K(R.buffer+O+L,R)+N}}while(r>1){N=C[C.length-2].cN?\"</span>\":\"\";q+=N;r--;C.length--}var P=C[C.length-1];C.length--;C[C.length-1].buffer=\"\";if(P.starts){I(P.starts,\"\")}return R.rE}if(x(L,R)){throw\"Illegal\"}}var H=d[J];var C=[H.dM];var B=0;var t=0;var q=\"\";try{var v=0;H.dM.buffer=\"\";do{var y=s(D,v);var u=E(y[0],y[1],y[2]);v+=y[0].length;if(!u){v+=y[1].length}}while(!y[2]);if(C.length>1){throw\"Illegal\"}return{r:B,keyword_count:t,value:q}}catch(G){if(G==\"Illegal\"){return{r:0,keyword_count:0,value:m(D)}}else{throw G}}}function f(t){var r={keyword_count:0,r:0,value:m(t)};var q=r;for(var p in d){if(!d.hasOwnProperty(p)){continue}var s=e(p,t);s.language=p;if(s.keyword_count+s.r>q.keyword_count+q.r){q=s}if(s.keyword_count+s.r>r.keyword_count+r.r){q=r;r=s}}if(q.language){r.second_best=q}return r}function h(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\\t)+)/gm,function(t,w,v,u){return w.replace(/\\t/g,q)})}if(p){r=r.replace(/\\n/g,\"<br>\")}return r}function o(u,x,q){var y=g(u,q);var s=a(u);if(s==\"no-highlight\"){return}if(s){var w=e(s,y)}else{var w=f(y);s=w.language}var p=b(u);if(p.length){var r=document.createElement(\"pre\");r.innerHTML=w.value;w.value=l(p,b(r),y)}w.value=h(w.value,x,q);var t=u.className;if(!t.match(\"(\\\\s|^)(language-)?\"+s+\"(\\\\s|$)\")){t=t?(t+\" \"+s):s}if(/MSIE [678]/.test(navigator.userAgent)&&u.tagName==\"CODE\"&&u.parentNode.tagName==\"PRE\"){var r=u.parentNode;var v=document.createElement(\"div\");v.innerHTML=\"<pre><code>\"+w.value+\"</code></pre>\";u=v.firstChild.firstChild;v.firstChild.cN=r.cN;r.parentNode.replaceChild(v.firstChild,r)}else{u.innerHTML=w.value}u.className=t;u.result={language:s,kw:w.keyword_count,re:w.r};if(w.second_best){u.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function k(){if(k.called){return}k.called=true;var r=document.getElementsByTagName(\"pre\");for(var p=0;p<r.length;p++){var q=j(r[p]);if(q){o(q,hljs.tabReplace)}}}function n(){if(window.addEventListener){window.addEventListener(\"DOMContentLoaded\",k,false);window.addEventListener(\"load\",k,false)}else{if(window.attachEvent){window.attachEvent(\"onload\",k)}else{window.onload=k}}}var d={};this.LANGUAGES=d;this.highlight=e;this.highlightAuto=f;this.fixMarkup=h;this.highlightBlock=o;this.initHighlighting=k;this.initHighlightingOnLoad=n;this.IR=\"[a-zA-Z][a-zA-Z0-9_]*\";this.UIR=\"[a-zA-Z_][a-zA-Z0-9_]*\";this.NR=\"\\\\b\\\\d+(\\\\.\\\\d+)?\";this.CNR=\"\\\\b(0x[A-Za-z0-9]+|\\\\d+(\\\\.\\\\d+)?)\";this.RSR=\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|\\\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\";this.BE={b:\"\\\\\\\\.\",r:0};this.ASM={cN:\"string\",b:\"'\",e:\"'\",i:\"\\\\n\",c:[this.BE],r:0};this.QSM={cN:\"string\",b:'\"',e:'\"',i:\"\\\\n\",c:[this.BE],r:0};this.CLCM={cN:\"comment\",b:\"//\",e:\"$\"};this.CBLCLM={cN:\"comment\",b:\"/\\\\*\",e:\"\\\\*/\"};this.HCM={cN:\"comment\",b:\"#\",e:\"$\"};this.NM={cN:\"number\",b:this.NR,r:0};this.CNM={cN:\"number\",b:this.CNR,r:0};this.inherit=function(p,s){var r={};for(var q in p){r[q]=p[q]}if(s){for(var q in s){r[q]=s[q]}}return r}}();hljs.LANGUAGES.cs={dM:{k:{\"abstract\":1,as:1,base:1,bool:1,\"break\":1,\"byte\":1,\"case\":1,\"catch\":1,\"char\":1,checked:1,\"class\":1,\"const\":1,\"continue\":1,decimal:1,\"default\":1,delegate:1,\"do\":1,\"do\":1,\"double\":1,\"else\":1,\"enum\":1,event:1,explicit:1,extern:1,\"false\":1,\"finally\":1,fixed:1,\"float\":1,\"for\":1,foreach:1,\"goto\":1,\"if\":1,implicit:1,\"in\":1,\"int\":1,\"interface\":1,internal:1,is:1,lock:1,\"long\":1,namespace:1,\"new\":1,\"null\":1,object:1,operator:1,out:1,override:1,params:1,\"private\":1,\"protected\":1,\"public\":1,readonly:1,ref:1,\"return\":1,sbyte:1,sealed:1,\"short\":1,sizeof:1,stackalloc:1,\"static\":1,string:1,struct:1,\"switch\":1,\"this\":1,\"throw\":1,\"true\":1,\"try\":1,\"typeof\":1,uint:1,ulong:1,unchecked:1,unsafe:1,ushort:1,using:1,virtual:1,\"volatile\":1,\"void\":1,\"while\":1,ascending:1,descending:1,from:1,get:1,group:1,into:1,join:1,let:1,orderby:1,partial:1,select:1,set:1,value:1,\"var\":1,where:1,yield:1},c:[{cN:\"comment\",b:\"///\",e:\"$\",rB:true,c:[{cN:\"xmlDocTag\",b:\"///|<!--|-->\"},{cN:\"xmlDocTag\",b:\"</?\",e:\">\"}]},hljs.CLCM,hljs.CBLCLM,{cN:\"string\",b:'@\"',e:'\"',c:[{b:'\"\"'}]},hljs.ASM,hljs.QSM,hljs.CNM]}};hljs.LANGUAGES.ruby=function(){var g=\"[a-zA-Z_][a-zA-Z0-9_]*(\\\\!|\\\\?)?\";var a=\"[a-zA-Z_]\\\\w*[!?=]?|[-+~]\\\\@|<<|>>|=~|===?|<=>|[<>]=?|\\\\*\\\\*|[-/+%^&*~`|]|\\\\[\\\\]=?\";var n={keyword:{and:1,\"false\":1,then:1,defined:1,module:1,\"in\":1,\"return\":1,redo:1,\"if\":1,BEGIN:1,retry:1,end:1,\"for\":1,\"true\":1,self:1,when:1,next:1,until:1,\"do\":1,begin:1,unless:1,END:1,rescue:1,nil:1,\"else\":1,\"break\":1,undef:1,not:1,\"super\":1,\"class\":1,\"case\":1,require:1,yield:1,alias:1,\"while\":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,\"all?\":1,allocate:1,ancestors:1,\"any?\":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,\"autoload?\":1,\"between?\":1,binding:1,binmode:1,\"block_given?\":1,call:1,callcc:1,caller:1,capitalize:1,\"capitalize!\":1,casecmp:1,\"catch\":1,ceil:1,center:1,chomp:1,\"chomp!\":1,chop:1,\"chop!\":1,chr:1,\"class\":1,class_eval:1,\"class_variable_defined?\":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,\"closed?\":1,coerce:1,collect:1,\"collect!\":1,compact:1,\"compact!\":1,concat:1,\"const_defined?\":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,\"default\":1,default_proc:1,\"delete\":1,\"delete!\":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,\"downcase!\":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,\"empty?\":1,entries:1,eof:1,\"eof?\":1,\"eql?\":1,\"equal?\":1,\"eval\":1,exec:1,exit:1,\"exit!\":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,\"flatten!\":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,\"frozen?\":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,\"gsub!\":1,\"has_key?\":1,\"has_value?\":1,hash:1,hex:1,id:1,include:1,\"include?\":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,\"instance_of?\":1,\"instance_variable_defined?\":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,\"integer?\":1,intern:1,invert:1,ioctl:1,\"is_a?\":1,isatty:1,\"iterator?\":1,join:1,\"key?\":1,keys:1,\"kind_of?\":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,\"lstrip!\":1,map:1,\"map!\":1,match:1,max:1,\"member?\":1,merge:1,\"merge!\":1,method:1,\"method_defined?\":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,\"new\":1,next:1,\"next!\":1,\"nil?\":1,nitems:1,\"nonzero?\":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,\"private_method_defined?\":1,private_methods:1,proc:1,protected_instance_methods:1,\"protected_method_defined?\":1,protected_methods:1,public_class_method:1,public_instance_methods:1,\"public_method_defined?\":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,\"reject!\":1,remainder:1,reopen:1,replace:1,require:1,\"respond_to?\":1,reverse:1,\"reverse!\":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,\"rstrip!\":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,\"slice!\":1,sort:1,\"sort!\":1,sort_by:1,split:1,sprintf:1,squeeze:1,\"squeeze!\":1,srand:1,stat:1,step:1,store:1,strip:1,\"strip!\":1,sub:1,\"sub!\":1,succ:1,\"succ!\":1,sum:1,superclass:1,swapcase:1,\"swapcase!\":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,\"tainted?\":1,tell:1,test:1,\"throw\":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,\"tr!\":1,tr_s:1,\"tr_s!\":1,trace_var:1,transpose:1,trap:1,truncate:1,\"tty?\":1,type:1,ungetc:1,uniq:1,\"uniq!\":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,\"upcase!\":1,update:1,upto:1,\"value?\":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,\"zero?\":1,zip:1}};var h={cN:\"yardoctag\",b:\"@[A-Za-z]+\"};var d={cN:\"comment\",b:\"#\",e:\"$\",c:[h]};var c={cN:\"comment\",b:\"^\\\\=begin\",e:\"^\\\\=end\",c:[h],r:10};var b={cN:\"comment\",b:\"^__END__\",e:\"\\\\n$\"};var u={cN:\"subst\",b:\"#\\\\{\",e:\"}\",l:g,k:n};var p=[hljs.BE,u];var s={cN:\"string\",b:\"'\",e:\"'\",c:p,r:0};var r={cN:\"string\",b:'\"',e:'\"',c:p,r:0};var q={cN:\"string\",b:\"%[qw]?\\\\(\",e:\"\\\\)\",c:p,r:10};var o={cN:\"string\",b:\"%[qw]?\\\\[\",e:\"\\\\]\",c:p,r:10};var m={cN:\"string\",b:\"%[qw]?{\",e:\"}\",c:p,r:10};var l={cN:\"string\",b:\"%[qw]?<\",e:\">\",c:p,r:10};var k={cN:\"string\",b:\"%[qw]?/\",e:\"/\",c:p,r:10};var j={cN:\"string\",b:\"%[qw]?%\",e:\"%\",c:p,r:10};var i={cN:\"string\",b:\"%[qw]?-\",e:\"-\",c:p,r:10};var t={cN:\"string\",b:\"%[qw]?\\\\|\",e:\"\\\\|\",c:p,r:10};var e={cN:\"function\",b:\"\\\\bdef\\\\s+\",e:\" |$|;\",l:g,k:n,c:[{cN:\"title\",b:a,l:g,k:n},{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",l:g,k:n},d,c,b]};var f={cN:\"identifier\",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:\"class\",b:\"\\\\b(class|module)\\\\b\",e:\"$|;\",k:{\"class\":1,module:1},c:[{cN:\"title\",b:\"[A-Za-z_]\\\\w*(::\\\\w+)*(\\\\?|\\\\!)?\",r:0},{cN:\"inheritance\",b:\"<\\\\s*\",c:[{cN:\"parent\",b:\"(\"+hljs.IR+\"::)?\"+hljs.IR}]},d,c,b]},e,{cN:\"constant\",b:\"(::)?([A-Z]\\\\w*(::)?)+\",r:0},{cN:\"symbol\",b:\":\",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{cN:\"number\",b:\"\\\\?\\\\w\"},{cN:\"variable\",b:\"(\\\\$\\\\W)|((\\\\$|\\\\@\\\\@?)(\\\\w+))\"},f,{b:\"(\"+hljs.RSR+\")\\\\s*\",c:[d,c,b,{cN:\"regexp\",b:\"/\",e:\"/[a-z]*\",i:\"\\\\n\",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}();hljs.LANGUAGES.javascript={dM:{k:{keyword:{\"in\":1,\"if\":1,\"for\":1,\"while\":1,\"finally\":1,\"var\":1,\"new\":1,\"function\":1,\"do\":1,\"return\":1,\"void\":1,\"else\":1,\"break\":1,\"catch\":1,\"instanceof\":1,\"with\":1,\"throw\":1,\"case\":1,\"default\":1,\"try\":1,\"this\":1,\"switch\":1,\"continue\":1,\"typeof\":1,\"delete\":1},literal:{\"true\":1,\"false\":1,\"null\":1}},c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM,hljs.CNM,{b:\"(\"+hljs.RSR+\"|case|return|throw)\\\\s*\",k:{\"return\":1,\"throw\":1,\"case\":1},c:[hljs.CLCM,hljs.CBLCLM,{cN:\"regexp\",b:\"/\",e:\"/[gim]*\",c:[{b:\"\\\\\\\\/\"}]}],r:0},{cN:\"function\",b:\"\\\\bfunction\\\\b\",e:\"{\",k:{\"function\":1},c:[{cN:\"title\",b:\"[A-Za-z$_][0-9A-Za-z$_]*\"},{cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM]}]}]}};hljs.LANGUAGES.css=function(){var a={cN:\"function\",b:hljs.IR+\"\\\\(\",e:\"\\\\)\",c:[{eW:true,eE:true,c:[hljs.NM,hljs.ASM,hljs.QSM]}]};return{cI:true,dM:{i:\"[=/|']\",c:[hljs.CBLCLM,{cN:\"id\",b:\"\\\\#[A-Za-z0-9_-]+\"},{cN:\"class\",b:\"\\\\.[A-Za-z0-9_-]+\",r:0},{cN:\"attr_selector\",b:\"\\\\[\",e:\"\\\\]\",i:\"$\"},{cN:\"pseudo\",b:\":(:)?[a-zA-Z0-9\\\\_\\\\-\\\\+\\\\(\\\\)\\\\\\\"\\\\']+\"},{cN:\"at_rule\",b:\"@(font-face|page)\",l:\"[a-z-]+\",k:{\"font-face\":1,page:1}},{cN:\"at_rule\",b:\"@\",e:\"[{;]\",eE:true,k:{\"import\":1,page:1,media:1,charset:1},c:[a,hljs.ASM,hljs.QSM,hljs.NM]},{cN:\"tag\",b:hljs.IR,r:0},{cN:\"rules\",b:\"{\",e:\"}\",i:\"[^\\\\s]\",r:0,c:[hljs.CBLCLM,{cN:\"rule\",b:\"[^\\\\s]\",rB:true,e:\";\",eW:true,c:[{cN:\"attribute\",b:\"[A-Z\\\\_\\\\.\\\\-]+\",e:\":\",eE:true,i:\"[^\\\\s]\",starts:{cN:\"value\",eW:true,eE:true,c:[a,hljs.NM,hljs.QSM,hljs.ASM,hljs.CBLCLM,{cN:\"hexcolor\",b:\"\\\\#[0-9A-F]+\"},{cN:\"important\",b:\"!important\"}]}}]}]}]}}}();hljs.LANGUAGES.xml=function(){var b=\"[A-Za-z0-9\\\\._:-]+\";var a={eW:true,c:[{cN:\"attribute\",b:b,r:0},{b:'=\"',rB:true,e:'\"',c:[{cN:\"value\",b:'\"',eW:true}]},{b:\"='\",rB:true,e:\"'\",c:[{cN:\"value\",b:\"'\",eW:true}]},{b:\"=\",c:[{cN:\"value\",b:\"[^\\\\s/>]+\"}]}]};return{cI:true,dM:{c:[{cN:\"pi\",b:\"<\\\\?\",e:\"\\\\?>\",r:10},{cN:\"doctype\",b:\"<!DOCTYPE\",e:\">\",r:10,c:[{b:\"\\\\[\",e:\"\\\\]\"}]},{cN:\"comment\",b:\"<!--\",e:\"-->\",r:10},{cN:\"cdata\",b:\"<\\\\!\\\\[CDATA\\\\[\",e:\"\\\\]\\\\]>\",r:10},{cN:\"tag\",b:\"<style\",e:\">\",k:{title:{style:1}},c:[a],starts:{cN:\"css\",e:\"</style>\",rE:true,sL:\"css\"}},{cN:\"tag\",b:\"<script\",e:\">\",k:{title:{script:1}},c:[a],starts:{cN:\"javascript\",e:\"<\\/script>\",rE:true,sL:\"javascript\"}},{cN:\"vbscript\",b:\"<%\",e:\"%>\",sL:\"vbscript\"},{cN:\"tag\",b:\"</?\",e:\"/?>\",c:[{cN:\"title\",b:\"[^ />]+\"},a]}]}}}();hljs.LANGUAGES.java={dM:{k:{\"false\":1,\"synchronized\":1,\"int\":1,\"abstract\":1,\"float\":1,\"private\":1,\"char\":1,\"interface\":1,\"boolean\":1,\"static\":1,\"null\":1,\"if\":1,\"const\":1,\"for\":1,\"true\":1,\"while\":1,\"long\":1,\"throw\":1,strictfp:1,\"finally\":1,\"protected\":1,\"extends\":1,\"import\":1,\"native\":1,\"final\":1,\"implements\":1,\"return\":1,\"void\":1,\"enum\":1,\"else\":1,\"break\":1,\"transient\":1,\"new\":1,\"catch\":1,\"instanceof\":1,\"byte\":1,\"super\":1,\"class\":1,\"volatile\":1,\"case\":1,assert:1,\"short\":1,\"package\":1,\"default\":1,\"double\":1,\"public\":1,\"try\":1,\"this\":1,\"switch\":1,\"continue\":1,\"throws\":1},c:[{cN:\"javadoc\",b:\"/\\\\*\\\\*\",e:\"\\\\*/\",c:[{cN:\"javadoctag\",b:\"@[A-Za-z]+\"}],r:10},hljs.CLCM,hljs.CBLCLM,hljs.ASM,hljs.QSM,{cN:\"class\",b:\"(class |interface )\",e:\"{\",k:{\"class\":1,\"interface\":1},i:\":\",c:[{b:\"(implements|extends)\",k:{\"extends\":1,\"implements\":1},r:10},{cN:\"title\",b:hljs.UIR}]},hljs.CNM,{cN:\"annotation\",b:\"@[A-Za-z]+\"}]}};hljs.LANGUAGES.php={cI:true,dM:{k:{and:1,include_once:1,list:1,\"abstract\":1,global:1,\"private\":1,echo:1,\"interface\":1,as:1,\"static\":1,endswitch:1,array:1,\"null\":1,\"if\":1,endwhile:1,or:1,\"const\":1,\"for\":1,endforeach:1,self:1,\"var\":1,\"while\":1,isset:1,\"public\":1,\"protected\":1,exit:1,foreach:1,\"throw\":1,elseif:1,\"extends\":1,include:1,__FILE__:1,empty:1,require_once:1,\"function\":1,\"do\":1,xor:1,\"return\":1,\"implements\":1,parent:1,clone:1,use:1,__CLASS__:1,__LINE__:1,\"else\":1,\"break\":1,print:1,\"eval\":1,\"new\":1,\"catch\":1,__METHOD__:1,\"class\":1,\"case\":1,exception:1,php_user_filter:1,\"default\":1,die:1,require:1,__FUNCTION__:1,enddeclare:1,\"final\":1,\"try\":1,\"this\":1,\"switch\":1,\"continue\":1,endfor:1,endif:1,declare:1,unset:1,\"true\":1,\"false\":1,namespace:1},c:[hljs.CLCM,hljs.HCM,{cN:\"comment\",b:\"/\\\\*\",e:\"\\\\*/\",c:[{cN:\"phpdoc\",b:\"\\\\s@[A-Za-z]+\",r:10}]},hljs.CNM,hljs.inherit(hljs.ASM,{i:null}),hljs.inherit(hljs.QSM,{i:null}),{cN:\"variable\",b:\"\\\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*\"},{cN:\"preprocessor\",b:\"<\\\\?php\",r:10},{cN:\"preprocessor\",b:\"\\\\?>\"}]}};hljs.LANGUAGES.python=function(){var c={cN:\"string\",b:\"(u|b)?r?'''\",e:\"'''\",r:10};var b={cN:\"string\",b:'(u|b)?r?\"\"\"',e:'\"\"\"',r:10};var a={cN:\"string\",b:\"(u|r|ur|b|br)'\",e:\"'\",c:[hljs.BE],r:10};var f={cN:\"string\",b:'(u|r|ur|b|br)\"',e:'\"',c:[hljs.BE],r:10};var d={cN:\"title\",b:hljs.UIR};var e={cN:\"params\",b:\"\\\\(\",e:\"\\\\)\",c:[c,b,a,f,hljs.ASM,hljs.QSM]};return{dM:{k:{keyword:{and:1,elif:1,is:1,global:1,as:1,\"in\":1,\"if\":1,from:1,raise:1,\"for\":1,except:1,\"finally\":1,print:1,\"import\":1,pass:1,\"return\":1,exec:1,\"else\":1,\"break\":1,not:1,\"with\":1,\"class\":1,assert:1,yield:1,\"try\":1,\"while\":1,\"continue\":1,del:1,or:1,def:1,lambda:1,nonlocal:10},built_in:{None:1,True:1,False:1,Ellipsis:1,NotImplemented:1}},i:\"(</|->|\\\\?)\",c:[hljs.HCM,c,b,a,f,hljs.ASM,hljs.QSM,{cN:\"function\",b:\"\\\\bdef \",e:\":\",i:\"$\",k:{def:1},c:[d,e],r:10},{cN:\"class\",b:\"\\\\bclass \",e:\":\",i:\"[${]\",k:{\"class\":1},c:[d,e],r:10},hljs.CNM,{cN:\"decorator\",b:\"@\",e:\"$\"}]}}}();hljs.LANGUAGES.perl=function(){var c={getpwent:1,getservent:1,quotemeta:1,msgrcv:1,scalar:1,kill:1,dbmclose:1,undef:1,lc:1,ma:1,syswrite:1,tr:1,send:1,umask:1,sysopen:1,shmwrite:1,vec:1,qx:1,utime:1,local:1,oct:1,semctl:1,localtime:1,readpipe:1,\"do\":1,\"return\":1,format:1,read:1,sprintf:1,dbmopen:1,pop:1,getpgrp:1,not:1,getpwnam:1,rewinddir:1,qq:1,fileno:1,qw:1,endprotoent:1,wait:1,sethostent:1,bless:1,s:1,opendir:1,\"continue\":1,each:1,sleep:1,endgrent:1,shutdown:1,dump:1,chomp:1,connect:1,getsockname:1,die:1,socketpair:1,close:1,flock:1,exists:1,index:1,shmget:1,sub:1,\"for\":1,endpwent:1,redo:1,lstat:1,msgctl:1,setpgrp:1,abs:1,exit:1,select:1,print:1,ref:1,gethostbyaddr:1,unshift:1,fcntl:1,syscall:1,\"goto\":1,getnetbyaddr:1,join:1,gmtime:1,symlink:1,semget:1,splice:1,x:1,getpeername:1,recv:1,log:1,setsockopt:1,cos:1,last:1,reverse:1,gethostbyname:1,getgrnam:1,study:1,formline:1,endhostent:1,times:1,chop:1,length:1,gethostent:1,getnetent:1,pack:1,getprotoent:1,getservbyname:1,rand:1,mkdir:1,pos:1,chmod:1,y:1,substr:1,endnetent:1,printf:1,next:1,open:1,msgsnd:1,readdir:1,use:1,unlink:1,getsockopt:1,getpriority:1,rindex:1,wantarray:1,hex:1,system:1,getservbyport:1,endservent:1,\"int\":1,chr:1,untie:1,rmdir:1,prototype:1,tell:1,listen:1,fork:1,shmread:1,ucfirst:1,setprotoent:1,\"else\":1,sysseek:1,link:1,getgrgid:1,shmctl:1,waitpid:1,unpack:1,getnetbyname:1,reset:1,chdir:1,grep:1,split:1,require:1,caller:1,lcfirst:1,until:1,warn:1,\"while\":1,values:1,shift:1,telldir:1,getpwuid:1,my:1,getprotobynumber:1,\"delete\":1,and:1,sort:1,uc:1,defined:1,srand:1,accept:1,\"package\":1,seekdir:1,getprotobyname:1,semop:1,our:1,rename:1,seek:1,\"if\":1,q:1,chroot:1,sysread:1,setpwent:1,no:1,crypt:1,getc:1,chown:1,sqrt:1,write:1,setnetent:1,setpriority:1,foreach:1,tie:1,sin:1,msgget:1,map:1,stat:1,getlogin:1,unless:1,elsif:1,truncate:1,exec:1,keys:1,glob:1,tied:1,closedir:1,ioctl:1,socket:1,readlink:1,\"eval\":1,xor:1,readline:1,binmode:1,setservent:1,eof:1,ord:1,bind:1,alarm:1,pipe:1,atan2:1,getgrent:1,exp:1,time:1,push:1,setgrent:1,gt:1,lt:1,or:1,ne:1,m:1};var d={cN:\"subst\",b:\"[$@]\\\\{\",e:\"}\",k:c,r:10};var b={cN:\"variable\",b:\"\\\\$\\\\d\"};var a={cN:\"variable\",b:\"[\\\\$\\\\%\\\\@\\\\*](\\\\^\\\\w\\\\b|#\\\\w+(\\\\:\\\\:\\\\w+)*|[^\\\\s\\\\w{]|{\\\\w+}|\\\\w+(\\\\:\\\\:\\\\w*)*)\"};var g=[hljs.BE,d,b,a];var f={b:\"->\",c:[{b:hljs.IR},{b:\"{\",e:\"}\"}]};var e=[b,a,hljs.HCM,{cN:\"comment\",b:\"^(__END__|__DATA__)\",e:\"\\\\n$\",r:5},f,{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\(\",e:\"\\\\)\",c:g,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\[\",e:\"\\\\]\",c:g,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\{\",e:\"\\\\}\",c:g,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\|\",e:\"\\\\|\",c:g,r:5},{cN:\"string\",b:\"q[qwxr]?\\\\s*\\\\<\",e:\"\\\\>\",c:g,r:5},{cN:\"string\",b:\"qw\\\\s+q\",e:\"q\",c:g,r:5},{cN:\"string\",b:\"'\",e:\"'\",c:[hljs.BE],r:0},{cN:\"string\",b:'\"',e:'\"',c:g,r:0},{cN:\"string\",b:\"`\",e:\"`\",c:[hljs.BE]},{cN:\"string\",b:\"{\\\\w+}\",r:0},{cN:\"string\",b:\"-?\\\\w+\\\\s*\\\\=\\\\>\",r:0},{cN:\"number\",b:\"(\\\\b0[0-7_]+)|(\\\\b0x[0-9a-fA-F_]+)|(\\\\b[1-9][0-9_]*(\\\\.[0-9_]+)?)|[0_]\\\\b\",r:0},{cN:\"regexp\",b:\"(s|tr|y)/(\\\\\\\\.|[^/])*/(\\\\\\\\.|[^/])*/[a-z]*\",r:10},{cN:\"regexp\",b:\"(m|qr)?/\",e:\"/[a-z]*\",c:[hljs.BE],r:0},{cN:\"sub\",b:\"\\\\bsub\\\\b\",e:\"(\\\\s*\\\\(.*?\\\\))?[;{]\",k:{sub:1},r:5},{cN:\"operator\",b:\"-\\\\w\\\\b\",r:0},{cN:\"pod\",b:\"\\\\=\\\\w\",e:\"\\\\=cut\"}];d.c=e;f.c[1].c=e;return{dM:{k:c,c:e}}}();hljs.LANGUAGES.cpp=function(){var b={keyword:{\"false\":1,\"int\":1,\"float\":1,\"while\":1,\"private\":1,\"char\":1,\"catch\":1,\"export\":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,\"const\":1,struct:1,\"for\":1,static_cast:2,union:1,namespace:1,unsigned:1,\"long\":1,\"throw\":1,\"volatile\":2,\"static\":1,\"protected\":1,bool:1,template:1,mutable:1,\"if\":1,\"public\":1,friend:2,\"do\":1,\"return\":1,\"goto\":1,auto:1,\"void\":2,\"enum\":1,\"else\":1,\"break\":1,\"new\":1,extern:1,using:1,\"true\":1,\"class\":1,asm:1,\"case\":1,typeid:1,\"short\":1,reinterpret_cast:2,\"default\":1,\"double\":1,register:1,explicit:1,signed:1,typename:1,\"try\":1,\"this\":1,\"switch\":1,\"continue\":1,wchar_t:1,inline:1,\"delete\":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};var a={cN:\"stl_container\",b:\"\\\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\\\s*<\",e:\">\",k:b,r:10};a.c=[a];return{dM:{k:b,i:\"</\",c:[hljs.CLCM,hljs.CBLCLM,hljs.QSM,{cN:\"string\",b:\"'\",e:\"[^\\\\\\\\]'\",i:\"[^\\\\\\\\][^']\"},hljs.CNM,{cN:\"preprocessor\",b:\"#\",e:\"$\"},a]}}}();"
  },
  {
    "path": "plugin/markdown/markdown.js",
    "content": "// From https://gist.github.com/1343518\n// Modified by Hakim to handle Markdown indented with tabs\n(function(){\n\n    if( typeof Showdown === 'undefined' ) {\n        throw 'The reveal.js Markdown plugin requires Showdown to be loaded';\n    }\n\n    var sections = document.querySelectorAll( '[data-markdown]' );\n\n    for( var i = 0, len = sections.length; i < len; i++ ) {\n        var section = sections[i];\n        var notes = section.querySelector( 'aside.notes' );\n\n        var template = section.querySelector( 'script' );\n\n        // strip leading whitespace so it isn't evaluated as code\n        var text = ( template || section ).innerHTML;\n\n        var leadingWs = text.match(/^\\n?(\\s*)/)[1].length,\n            leadingTabs = text.match(/^\\n?(\\t*)/)[1].length;\n\n        if( leadingTabs > 0 ) {\n            text = text.replace( new RegExp('\\\\n?\\\\t{' + leadingTabs + '}','g'), '\\n' );\n        }\n        else if( leadingWs > 1 ) {\n            text = text.replace( new RegExp('\\\\n? {' + leadingWs + '}','g'), '\\n' );\n        }\n\n        section.innerHTML = (new Showdown.converter()).makeHtml(text);\n\n        if( notes ) {\n            section.appendChild( notes );\n        }\n    }\n\n})();"
  },
  {
    "path": "plugin/markdown/showdown.js",
    "content": "//\n// showdown.js -- A javascript port of Markdown.\n//\n// Copyright (c) 2007 John Fraser.\n//\n// Original Markdown Copyright (c) 2004-2005 John Gruber\n//   <http://daringfireball.net/projects/markdown/>\n//\n// Redistributable under a BSD-style open source license.\n// See license.txt for more information.\n//\n// The full source distribution is at:\n//\n//\t\t\t\tA A L\n//\t\t\t\tT C A\n//\t\t\t\tT K B\n//\n//   <http://www.attacklab.net/>\n//\n//\n// Wherever possible, Showdown is a straight, line-by-line port\n// of the Perl version of Markdown.\n//\n// This is not a normal parser design; it's basically just a\n// series of string substitutions.  It's hard to read and\n// maintain this way,  but keeping Showdown close to the original\n// design makes it easier to port new features.\n//\n// More importantly, Showdown behaves like markdown.pl in most\n// edge cases.  So web applications can do client-side preview\n// in Javascript, and then build identical HTML on the server.\n//\n// This port needs the new RegExp functionality of ECMA 262,\n// 3rd Edition (i.e. Javascript 1.5).  Most modern web browsers\n// should do fine.  Even with the new regular expression features,\n// We do a lot of work to emulate Perl's regex functionality.\n// The tricky changes in this file mostly have the \"attacklab:\"\n// label.  Major or self-explanatory changes don't.\n//\n// Smart diff tools like Araxis Merge will be able to match up\n// this file with markdown.pl in a useful way.  A little tweaking\n// helps: in a copy of markdown.pl, replace \"#\" with \"//\" and\n// replace \"$text\" with \"text\".  Be sure to ignore whitespace\n// and line endings.\n//\n//\n// Showdown usage:\n//\n//   var text = \"Markdown *rocks*.\";\n//\n//   var converter = new Showdown.converter();\n//   var html = converter.makeHtml(text);\n//\n//   alert(html);\n//\n// Note: move the sample code to the bottom of this\n// file before uncommenting it.\n//\n//\n// Showdown namespace\n//\nvar Showdown={};Showdown.converter=function(){var a,b,c,d=0;this.makeHtml=function(d){return a=new Array,b=new Array,c=new Array,d=d.replace(/~/g,\"~T\"),d=d.replace(/\\$/g,\"~D\"),d=d.replace(/\\r\\n/g,\"\\n\"),d=d.replace(/\\r/g,\"\\n\"),d=\"\\n\\n\"+d+\"\\n\\n\",d=F(d),d=d.replace(/^[ \\t]+$/mg,\"\"),d=f(d),d=e(d),d=h(d),d=D(d),d=d.replace(/~D/g,\"$$\"),d=d.replace(/~T/g,\"~\"),d};var e=function(c){var c=c.replace(/^[ ]{0,3}\\[(.+)\\]:[ \\t]*\\n?[ \\t]*<?(\\S+?)>?[ \\t]*\\n?[ \\t]*(?:(\\n*)[\"(](.+?)[\")][ \\t]*)?(?:\\n+|\\Z)/gm,function(c,d,e,f,g){return d=d.toLowerCase(),a[d]=z(e),f?f+g:(g&&(b[d]=g.replace(/\"/g,\"&quot;\")),\"\")});return c},f=function(a){a=a.replace(/\\n/g,\"\\n\\n\");var b=\"p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del\",c=\"p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math\";return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\\b[^\\r]*?\\n<\\/\\2>[ \\t]*(?=\\n+))/gm,g),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\\b[^\\r]*?.*<\\/\\2>[ \\t]*(?=\\n+)\\n)/gm,g),a=a.replace(/(\\n[ ]{0,3}(<(hr)\\b([^<>])*?\\/?>)[ \\t]*(?=\\n{2,}))/g,g),a=a.replace(/(\\n\\n[ ]{0,3}<!(--[^\\r]*?--\\s*)+>[ \\t]*(?=\\n{2,}))/g,g),a=a.replace(/(?:\\n\\n)([ ]{0,3}(?:<([?%])[^\\r]*?\\2>)[ \\t]*(?=\\n{2,}))/g,g),a=a.replace(/\\n\\n/g,\"\\n\"),a},g=function(a,b){var d=b;return d=d.replace(/\\n\\n/g,\"\\n\"),d=d.replace(/^\\n/,\"\"),d=d.replace(/\\n+$/g,\"\"),d=\"\\n\\n~K\"+(c.push(d)-1)+\"K\\n\\n\",d},h=function(a){a=o(a);var b=t(\"<hr />\");return a=a.replace(/^[ ]{0,2}([ ]?\\*[ ]?){3,}[ \\t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\\-[ ]?){3,}[ \\t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\\_[ ]?){3,}[ \\t]*$/gm,b),a=q(a),a=s(a),a=r(a),a=x(a),a=f(a),a=y(a),a},i=function(a){return a=u(a),a=j(a),a=A(a),a=m(a),a=k(a),a=B(a),a=z(a),a=w(a),a=a.replace(/  +\\n/g,\" <br />\\n\"),a},j=function(a){var b=/(<[a-z\\/!$](\"[^\"]*\"|'[^']*'|[^'\">])*>|<!(--.*?--\\s*)+>)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\\/?code>(?=.)/g,\"$1`\");return b=G(b,\"\\\\`*_\"),b}),a},k=function(a){return a=a.replace(/(\\[((?:\\[[^\\]]*\\]|[^\\[\\]])*)\\][ ]?(?:\\n[ ]*)?\\[(.*?)\\])()()()()/g,l),a=a.replace(/(\\[((?:\\[[^\\]]*\\]|[^\\[\\]])*)\\]\\([ \\t]*()<?(.*?)>?[ \\t]*((['\"])(.*?)\\6[ \\t]*)?\\))/g,l),a=a.replace(/(\\[([^\\[\\]]+)\\])()()()()()/g,l),a},l=function(c,d,e,f,g,h,i,j){j==undefined&&(j=\"\");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(n==\"\"){m==\"\"&&(m=l.toLowerCase().replace(/ ?\\n/g,\" \")),n=\"#\"+m;if(a[m]!=undefined)n=a[m],b[m]!=undefined&&(o=b[m]);else{if(!(k.search(/\\(\\s*\\)$/m)>-1))return k;n=\"\"}}n=G(n,\"*_\");var p='<a href=\"'+n+'\"';return o!=\"\"&&(o=o.replace(/\"/g,\"&quot;\"),o=G(o,\"*_\"),p+=' title=\"'+o+'\"'),p+=\">\"+l+\"</a>\",p},m=function(a){return a=a.replace(/(!\\[(.*?)\\][ ]?(?:\\n[ ]*)?\\[(.*?)\\])()()()()/g,n),a=a.replace(/(!\\[(.*?)\\]\\s?\\([ \\t]*()<?(\\S+?)>?[ \\t]*((['\"])(.*?)\\6[ \\t]*)?\\))/g,n),a},n=function(c,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;o||(o=\"\");if(n==\"\"){m==\"\"&&(m=l.toLowerCase().replace(/ ?\\n/g,\" \")),n=\"#\"+m;if(a[m]==undefined)return k;n=a[m],b[m]!=undefined&&(o=b[m])}l=l.replace(/\"/g,\"&quot;\"),n=G(n,\"*_\");var p='<img src=\"'+n+'\" alt=\"'+l+'\"';return o=o.replace(/\"/g,\"&quot;\"),o=G(o,\"*_\"),p+=' title=\"'+o+'\"',p+=\" />\",p},o=function(a){function b(a){return a.replace(/[^\\w]/g,\"\").toLowerCase()}return a=a.replace(/^(.+)[ \\t]*\\n=+[ \\t]*\\n+/gm,function(a,c){return t('<h1 id=\"'+b(c)+'\">'+i(c)+\"</h1>\")}),a=a.replace(/^(.+)[ \\t]*\\n-+[ \\t]*\\n+/gm,function(a,c){return t('<h2 id=\"'+b(c)+'\">'+i(c)+\"</h2>\")}),a=a.replace(/^(\\#{1,6})[ \\t]*(.+?)[ \\t]*\\#*\\n+/gm,function(a,c,d){var e=c.length;return t(\"<h\"+e+' id=\"'+b(d)+'\">'+i(d)+\"</h\"+e+\">\")}),a},p,q=function(a){a+=\"~0\";var b=/^(([ ]{0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(~0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/gm;return d?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?\"ul\":\"ol\";d=d.replace(/\\n{2,}/g,\"\\n\\n\\n\");var f=p(d);return f=f.replace(/\\s+$/,\"\"),f=\"<\"+e+\">\"+f+\"</\"+e+\">\\n\",f}):(b=/(\\n\\n|^\\n?)(([ ]{0,3}([*+-]|\\d+[.])[ \\t]+)[^\\r]+?(~0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.])[ \\t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?\"ul\":\"ol\",f=f.replace(/\\n{2,}/g,\"\\n\\n\\n\"),h=p(f);return h=e+\"<\"+g+\">\\n\"+h+\"</\"+g+\">\\n\",h})),a=a.replace(/~0/,\"\"),a};p=function(a){return d++,a=a.replace(/\\n{2,}$/,\"\\n\"),a+=\"~0\",a=a.replace(/(\\n)?(^[ \\t]*)([*+-]|\\d+[.])[ \\t]+([^\\r]+?(\\n{1,2}))(?=\\n*(~0|\\2([*+-]|\\d+[.])[ \\t]+))/gm,function(a,b,c,d,e){var f=e,g=b,j=c;return g||f.search(/\\n{2,}/)>-1?f=h(E(f)):(f=q(E(f)),f=f.replace(/\\n$/,\"\"),f=i(f)),\"<li>\"+f+\"</li>\\n\"}),a=a.replace(/~0/g,\"\"),d--,a};var r=function(a){return a+=\"~0\",a=a.replace(/(?:\\n\\n|^)((?:(?:[ ]{4}|\\t).*\\n+)+)(\\n*[ ]{0,3}[^ \\t\\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=v(E(d)),d=F(d),d=d.replace(/^\\n+/g,\"\"),d=d.replace(/\\n+$/g,\"\"),d=\"<pre><code>\"+d+\"\\n</code></pre>\",t(d)+e}),a=a.replace(/~0/,\"\"),a},s=function(a){return a+=\"~0\",a=a.replace(/\\n```(.*)\\n([^`]+)\\n```/g,function(a,b,c){var d=b,e=c;return e=v(e),e=F(e),e=e.replace(/^\\n+/g,\"\"),e=e.replace(/\\n+$/g,\"\"),e=\"<pre><code class=\"+d+\">\"+e+\"\\n</code></pre>\",t(e)}),a=a.replace(/~0/,\"\"),a},t=function(a){return a=a.replace(/(^\\n+|\\n+$)/g,\"\"),\"\\n\\n~K\"+(c.push(a)-1)+\"K\\n\\n\"},u=function(a){return a=a.replace(/(^|[^\\\\])(`+)([^\\r]*?[^`])\\2(?!`)/gm,function(a,b,c,d,e){var f=d;return f=f.replace(/^([ \\t]*)/g,\"\"),f=f.replace(/[ \\t]*$/g,\"\"),f=v(f),b+\"<code>\"+f+\"</code>\"}),a},v=function(a){return a=a.replace(/&/g,\"&amp;\"),a=a.replace(/</g,\"&lt;\"),a=a.replace(/>/g,\"&gt;\"),a=G(a,\"*_{}[]\\\\\",!1),a},w=function(a){return a=a.replace(/(\\*\\*|__)(?=\\S)([^\\r]*?\\S[*_]*)\\1/g,\"<strong>$2</strong>\"),a=a.replace(/(\\*|_)(?=\\S)([^\\r]*?\\S)\\1/g,\"<em>$2</em>\"),a},x=function(a){return a=a.replace(/((^[ \\t]*>[ \\t]?.+\\n(.+\\n)*\\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \\t]*>[ \\t]?/gm,\"~0\"),c=c.replace(/~0/g,\"\"),c=c.replace(/^[ \\t]+$/gm,\"\"),c=h(c),c=c.replace(/(^|\\n)/g,\"$1  \"),c=c.replace(/(\\s*<pre>[^\\r]+?<\\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^  /mg,\"~0\"),c=c.replace(/~0/g,\"\"),c}),t(\"<blockquote>\\n\"+c+\"\\n</blockquote>\")}),a},y=function(a){a=a.replace(/^\\n+/g,\"\"),a=a.replace(/\\n+$/g,\"\");var b=a.split(/\\n{2,}/g),d=new Array,e=b.length;for(var f=0;f<e;f++){var g=b[f];g.search(/~K(\\d+)K/g)>=0?d.push(g):g.search(/\\S/)>=0&&(g=i(g),g=g.replace(/^([ \\t]*)/g,\"<p>\"),g+=\"</p>\",d.push(g))}e=d.length;for(var f=0;f<e;f++)while(d[f].search(/~K(\\d+)K/)>=0){var h=c[RegExp.$1];h=h.replace(/\\$/g,\"$$$$\"),d[f]=d[f].replace(/~K\\d+K/,h)}return d.join(\"\\n\\n\")},z=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\\w+);)/g,\"&amp;\"),a=a.replace(/<(?![a-z\\/?\\$!])/gi,\"&lt;\"),a},A=function(a){return a=a.replace(/\\\\(\\\\)/g,H),a=a.replace(/\\\\([`*_{}\\[\\]()>#+-.!])/g,H),a},B=function(a){return a=a.replace(/<((https?|ftp|dict):[^'\">\\s]+)>/gi,'<a href=\"$1\">$1</a>'),a=a.replace(/<(?:mailto:)?([-.\\w]+\\@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]+)>/gi,function(a,b){return C(D(b))}),a},C=function(a){function b(a){var b=\"0123456789ABCDEF\",c=a.charCodeAt(0);return b.charAt(c>>4)+b.charAt(c&15)}var c=[function(a){return\"&#\"+a.charCodeAt(0)+\";\"},function(a){return\"&#x\"+b(a)+\";\"},function(a){return a}];return a=\"mailto:\"+a,a=a.replace(/./g,function(a){if(a==\"@\")a=c[Math.floor(Math.random()*2)](a);else if(a!=\":\"){var b=Math.random();a=b>.9?c[2](a):b>.45?c[1](a):c[0](a)}return a}),a='<a href=\"'+a+'\">'+a+\"</a>\",a=a.replace(/\">.+:/g,'\">'),a},D=function(a){return a=a.replace(/~E(\\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)}),a},E=function(a){return a=a.replace(/^(\\t|[ ]{1,4})/gm,\"~0\"),a=a.replace(/~0/g,\"\"),a},F=function(a){return a=a.replace(/\\t(?=\\t)/g,\"    \"),a=a.replace(/\\t/g,\"~A~B\"),a=a.replace(/~B(.+?)~A/g,function(a,b,c){var d=b,e=4-d.length%4;for(var f=0;f<e;f++)d+=\" \";return d}),a=a.replace(/~A/g,\"    \"),a=a.replace(/~B/g,\"\"),a},G=function(a,b,c){var d=\"([\"+b.replace(/([\\[\\]\\\\])/g,\"\\\\$1\")+\"])\";c&&(d=\"\\\\\\\\\"+d);var e=new RegExp(d,\"g\");return a=a.replace(e,H),a},H=function(a,b){var c=b.charCodeAt(0);return\"~E\"+c+\"E\"}},typeof exports!=\"undefined\"&&(exports=Showdown);"
  },
  {
    "path": "plugin/notes/notes.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\n\t\t<title>reveal.js - Slide Notes</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: Helvetica;\n\t\t\t}\n\n\t\t\t#notes {\n\t\t\t\tfont-size: 24px;\n\t\t\t\twidth: 640px;\n\t\t\t\tmargin-top: 5px;\n\t\t\t}\n\n\t\t\t#wrap-current-slide {\n\t\t\t\twidth: 640px;\n\t\t\t\theight: 512px;\n\t\t\t\tfloat: left;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n\t\t\t#current-slide {\n\t\t\t\twidth: 1280px;\n\t\t\t\theight: 1024px;\n\t\t\t\tborder: none;\n\n\t\t\t\t-webkit-transform-origin: 0 0;\n\t\t\t\t\t -moz-transform-origin: 0 0;\n\t\t\t\t\t\t-ms-transform-origin: 0 0;\n\t\t\t\t\t\t -o-transform-origin: 0 0;\n\t\t\t\t\t\t\t\ttransform-origin: 0 0;\n\n\t\t\t\t-webkit-transform: scale(0.5);\n\t\t\t\t\t -moz-transform: scale(0.5);\n\t\t\t\t\t\t-ms-transform: scale(0.5);\n\t\t\t\t\t\t -o-transform: scale(0.5);\n\t\t\t\t\t\t\t\ttransform: scale(0.5);\n\t\t\t}\n\n\t\t\t#wrap-next-slide {\n\t\t\t\twidth: 448px;\n\t\t\t\theight: 358px;\n\t\t\t\tfloat: left;\n\t\t\t\tmargin: 0 0 0 10px;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n\t\t\t#next-slide {\n\t\t\t\twidth: 1280px;\n\t\t\t\theight: 1024px;\n\t\t\t\tborder: none;\n\n\t\t\t\t-webkit-transform-origin: 0 0;\n\t\t\t\t\t -moz-transform-origin: 0 0;\n\t\t\t\t\t\t-ms-transform-origin: 0 0;\n\t\t\t\t\t\t -o-transform-origin: 0 0;\n\t\t\t\t\t\t\t\ttransform-origin: 0 0;\n\n\t\t\t\t-webkit-transform: scale(0.35);\n\t\t\t\t\t -moz-transform: scale(0.35);\n\t\t\t\t\t\t-ms-transform: scale(0.35);\n\t\t\t\t\t\t -o-transform: scale(0.35);\n\t\t\t\t\t\t\t\ttransform: scale(0.35);\n\t\t\t}\n\n\t\t\t.slides {\n\t\t\t\tposition: relative;\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tborder: 1px solid black;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tbackground: rgb(28, 30, 32);\n\t\t\t}\n\n\t\t\t.slides span {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 3px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tcolor: rgba( 255, 255, 255, 0.9 );\n\t\t\t}\n\t\t</style>\n\t</head>\n\n\t<body>\n\n\t\t<div id=\"wrap-current-slide\" class=\"slides\">\n\t\t\t<iframe src=\"../../index.html\" width=\"1280\" height=\"1024\" id=\"current-slide\"></iframe>\n\t\t</div>\n\n\t\t<div id=\"wrap-next-slide\" class=\"slides\">\n\t\t\t<iframe src=\"../../index.html\" width=\"640\" height=\"512\" id=\"next-slide\"></iframe>\n\t\t\t<span>UPCOMING:</span>\n\t\t</div>\n\t\t<div id=\"notes\"></div>\n\n\t\t<script src=\"../../plugin/markdown/showdown.js\"></script>\n\t\t<script>\n\t\t\twindow.addEventListener( 'load', function() {\n\n\t\t\t\t(function( window, undefined ) {\n\t\t\t\t\tvar notes = document.getElementById( 'notes' ),\n\t\t\t\t\t\tcurrentSlide = document.getElementById( 'current-slide' ),\n\t\t\t\t\t\tnextSlide = document.getElementById( 'next-slide' );\n\n\t\t\t\t\twindow.addEventListener( 'message', function( event ) {\n\t\t\t\t\t\tvar data = JSON.parse( event.data );\n\t\t\t\t\t\t// No need for updating the notes in case of fragment changes\n\t\t\t\t\t\tif ( data.notes !== undefined) {\n\t\t\t\t\t\t\tif( data.markdown ) {\n\t\t\t\t\t\t\t\tnotes.innerHTML = (new Showdown.converter()).makeHtml( data.notes );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tnotes.innerHTML = data.notes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Showing and hiding fragments\n\t\t\t\t\t\tif( data.fragment === 'next' ) {\n\t\t\t\t\t\t\tcurrentSlide.contentWindow.Reveal.nextFragment();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if( data.fragment === 'prev' ) {\n\t\t\t\t\t\t\tcurrentSlide.contentWindow.Reveal.prevFragment();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Update the note slides\n\t\t\t\t\t\t\tcurrentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv );\n\t\t\t\t\t\t\tnextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, false );\n\n\t\t\t\t})( window );\n\n\t\t\t}, false );\n\n\t\t</script>\n\t</body>\n</html>\n"
  },
  {
    "path": "plugin/notes/notes.js",
    "content": "/**\n * Handles opening of and synchronization with the reveal.js\n * notes window.\n */\nvar RevealNotes = (function() {\n\n\tfunction openNotes() {\n\t\tvar notesPopup = window.open( 'plugin/notes/notes.html', 'reveal.js - Notes', 'width=1120,height=850' );\n\n\t\t// Fires when slide is changed\n\t\tReveal.addEventListener( 'slidechanged', function( event ) {\n\t\t\tpost('slidechanged');\n\t\t} );\n\n\t\t// Fires when a fragment is shown\n\t\tReveal.addEventListener( 'fragmentshown', function( event ) {\n\t\t\tpost('fragmentshown');\n\t\t} );\n\n\t\t// Fires when a fragment is hidden\n\t\tReveal.addEventListener( 'fragmenthidden', function( event ) {\n\t\t\tpost('fragmenthidden');\n\t\t} );\n\n\t\t/**\n\t\t * Posts the current slide data to the notes window\n\t\t *\n\t\t * @param {String} eventType Expecting 'slidechanged', 'fragmentshown' \n\t\t * or 'fragmenthidden' set in the events above to define the needed \n\t\t * slideDate.\n\t\t */\n\t\tfunction post( eventType ) {\n\t\t\tvar slideElement = Reveal.getCurrentSlide(),\n\t\t\t\tmessageData;\n\n\t\t\tif( eventType === 'slidechanged' ) {\n\t\t\t\tvar notes = slideElement.querySelector( 'aside.notes' ),\n\t\t\t\t\tindexh = Reveal.getIndices().h,\n\t\t\t\t\tindexv = Reveal.getIndices().v,\n\t\t\t\t\tnextindexh,\n\t\t\t\t\tnextindexv;\n\n\t\t\t\tif( slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION' ) {\n\t\t\t\t\tnextindexh = indexh;\n\t\t\t\t\tnextindexv = indexv + 1;\n\t\t\t\t} else {\n\t\t\t\t\tnextindexh = indexh + 1;\n\t\t\t\t\tnextindexv = 0;\n\t\t\t\t}\n\n\t\t\t\tmessageData = {\n\t\t\t\t\tnotes : notes ? notes.innerHTML : '',\n\t\t\t\t\tindexh : indexh,\n\t\t\t\t\tindexv : indexv,\n\t\t\t\t\tnextindexh : nextindexh,\n\t\t\t\t\tnextindexv : nextindexv,\n\t\t\t\t\tmarkdown : notes ? typeof notes.getAttribute( 'data-markdown' ) === 'string' : false\n\t\t\t\t};\n\t\t\t}\n\t\t\telse if( eventType === 'fragmentshown' ) {\n\t\t\t\tmessageData = {\n\t\t\t\t\tfragment : 'next'\n\t\t\t\t};\n\t\t\t}\n\t\t\telse if( eventType === 'fragmenthidden' ) {\n\t\t\t\tmessageData = {\n\t\t\t\t\tfragment : 'prev'\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tnotesPopup.postMessage( JSON.stringify( messageData ), '*' );\n\t\t}\n\n\t\t// Navigate to the current slide when the notes are loaded\n\t\tnotesPopup.addEventListener( 'load', function( event ) {\n\t\t\tpost('slidechanged');\n\t\t}, false );\n\t}\n\n\t// If the there's a 'notes' query set, open directly\n\tif( window.location.search.match( /(\\?|\\&)notes/gi ) !== null ) {\n\t\topenNotes();\n\t}\n\n\t// Open the notes when the 's' key is hit\n\tdocument.addEventListener( 'keydown', function( event ) {\n\t\t// Disregard the event if the target is editable or a\n\t\t// modifier is present\n\t\tif ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;\n\n\t\tif( event.keyCode === 83 ) {\n\t\t\tevent.preventDefault();\n\t\t\topenNotes();\n\t\t}\n\t}, false );\n\n\treturn { open: openNotes };\n})();\n"
  },
  {
    "path": "plugin/notes-server/client.js",
    "content": "(function() {\n\t// don't emit events from inside the previews themselves\n\tif ( window.location.search.match( /receiver/gi ) ) { return; }\n\n\tvar socket = io.connect(window.location.origin);\n\tvar socketId = Math.random().toString().slice(2);\n\t\n\tconsole.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);\n\twindow.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId);\n\n\t// Fires when a fragment is shown\n\tReveal.addEventListener( 'fragmentshown', function( event ) {\n\t\tvar fragmentData = {\n\t\t\tfragment : 'next',\n\t\t\tsocketId : socketId\n\t\t};\n\t\tsocket.emit('fragmentchanged', fragmentData);\n\t} );\n\n\t// Fires when a fragment is hidden\n\tReveal.addEventListener( 'fragmenthidden', function( event ) {\n\t\tvar fragmentData = {\n\t\t\tfragment : 'previous',\n\t\t\tsocketId : socketId\n\t\t};\n\t\tsocket.emit('fragmentchanged', fragmentData);\n\t} );\n\n\t// Fires when slide is changed\n\tReveal.addEventListener( 'slidechanged', function( event ) {\n\t\tvar nextindexh;\n\t\tvar nextindexv;\n\t\tvar slideElement = event.currentSlide;\n\n\t\tif (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') {\n\t\t\tnextindexh = event.indexh;\n\t\t\tnextindexv = event.indexv + 1;\n\t\t} else {\n\t\t\tnextindexh = event.indexh + 1;\n\t\t\tnextindexv = 0;\n\t\t}\n\n\t\tvar notes = slideElement.querySelector('aside.notes');\n\t\tvar slideData = {\n\t\t\tnotes : notes ? notes.innerHTML : '',\n\t\t\tindexh : event.indexh,\n\t\t\tindexv : event.indexv,\n\t\t\tnextindexh : nextindexh,\n\t\t\tnextindexv : nextindexv,\n\t\t\tsocketId : socketId,\n\t\t\tmarkdown : notes ? typeof notes.getAttribute('data-markdown') === 'string' : false\n\n\t\t};\n\n\t\tsocket.emit('slidechanged', slideData);\n\t} );\n}());\n"
  },
  {
    "path": "plugin/notes-server/index.js",
    "content": "var express   = require('express');\nvar fs        = require('fs');\nvar io        = require('socket.io');\nvar _         = require('underscore');\nvar Mustache  = require('mustache');\n\nvar app       = express.createServer();\nvar staticDir = express.static;\n\nio            = io.listen(app);\n\nvar opts = {\n\tport :      1947,\n\tbaseDir :   __dirname + '/../../'\n};\n\nio.sockets.on('connection', function(socket) {\n\tsocket.on('slidechanged', function(slideData) {\n\t\tsocket.broadcast.emit('slidedata', slideData);\n\t});\n\tsocket.on('fragmentchanged', function(fragmentData) {\n\t\tsocket.broadcast.emit('fragmentdata', fragmentData);\n\t});\n});\n\napp.configure(function() {\n\t[ 'css', 'js', 'images', 'plugin', 'lib' ].forEach(function(dir) {\n\t\tapp.use('/' + dir, staticDir(opts.baseDir + dir));\n\t});\n});\n\napp.get(\"/\", function(req, res) {\n\tfs.createReadStream(opts.baseDir + '/index.html').pipe(res);\n});\n\napp.get(\"/notes/:socketId\", function(req, res) {\n\n\tfs.readFile(opts.baseDir + 'plugin/notes-server/notes.html', function(err, data) {\n\t\tres.send(Mustache.to_html(data.toString(), {\n\t\t\tsocketId : req.params.socketId\n\t\t}));\n\t});\n\t// fs.createReadStream(opts.baseDir + 'notes-server/notes.html').pipe(res);\n});\n\n// Actually listen\napp.listen(opts.port || null);\n\nvar brown = '\\033[33m',\n\tgreen = '\\033[32m',\n\treset = '\\033[0m';\n\nvar slidesLocation = \"http://localhost\" + ( opts.port ? ( ':' + opts.port ) : '' );\n\nconsole.log( brown + \"reveal.js - Speaker Notes\" + reset );\nconsole.log( \"1. Open the slides at \" + green + slidesLocation + reset );\nconsole.log( \"2. Click on the link your JS console to go to the notes page\" );\nconsole.log( \"3. Advance through your slides and your notes will advance automatically\" );\n"
  },
  {
    "path": "plugin/notes-server/notes.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\">\n\n\t\t<title>reveal.js - Slide Notes</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: Helvetica;\n\t\t\t}\n\n\t\t\t#notes {\n\t\t\t\tfont-size: 24px;\n\t\t\t\twidth: 640px;\n\t\t\t\tmargin-top: 5px;\n\t\t\t}\n\n\t\t\t#wrap-current-slide {\n\t\t\t\twidth: 640px;\n\t\t\t\theight: 512px;\n\t\t\t\tfloat: left;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n\t\t\t#current-slide {\n\t\t\t\twidth: 1280px;\n\t\t\t\theight: 1024px;\n\t\t\t\tborder: none;\n\t\t\t\t\n\t\t\t\t-webkit-transform-origin: 0 0;\n\t\t\t\t   -moz-transform-origin: 0 0;\n\t\t\t\t    -ms-transform-origin: 0 0;\n\t\t\t\t     -o-transform-origin: 0 0;\n\t\t\t\t        transform-origin: 0 0;\n\t\t\t\t \n\t\t\t\t-webkit-transform: scale(0.5);\n\t\t\t\t   -moz-transform: scale(0.5);\n\t\t\t\t    -ms-transform: scale(0.5);\n\t\t\t\t     -o-transform: scale(0.5);\n\t\t\t\t        transform: scale(0.5);\n\t\t\t}\n\n\t\t\t#wrap-next-slide {\n\t\t\t\twidth: 448px;\n\t\t\t\theight: 358px;\n\t\t\t\tfloat: left;\n\t\t\t\tmargin: 0 0 0 10px;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\n\t\t\t#next-slide {\n\t\t\t\twidth: 1280px;\n\t\t\t\theight: 1024px;\n\t\t\t\tborder: none;\n\t\t\t\t\n\t\t\t\t-webkit-transform-origin: 0 0;\n\t\t\t\t   -moz-transform-origin: 0 0;\n\t\t\t\t    -ms-transform-origin: 0 0;\n\t\t\t\t     -o-transform-origin: 0 0;\n\t\t\t\t        transform-origin: 0 0;\n\n\t\t\t\t-webkit-transform: scale(0.35);\n\t\t\t\t   -moz-transform: scale(0.35);\n\t\t\t\t    -ms-transform: scale(0.35);\n\t\t\t\t     -o-transform: scale(0.35);\n\t\t\t\t        transform: scale(0.35);\n\t\t\t}\n\n\t\t\t.slides {\n\t\t\t\tposition: relative;\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tborder: 1px solid black;\n\t\t\t\tborder-radius: 2px;\n\t\t\t\tbackground: rgb(28, 30, 32);\n\t\t\t}\n\n\t\t\t.slides span {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tleft: 3px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tcolor: rgba( 255, 255, 255, 0.9 );\n\t\t\t}\n\t\t</style>\n\t</head>\n\n\t<body>\n\n\t\t<div id=\"wrap-current-slide\" class=\"slides\">\n\t\t\t<iframe src=\"/?receiver\" width=\"1280\" height=\"1024\" id=\"current-slide\"></iframe>\n\t\t</div>\n\n\t\t<div id=\"wrap-next-slide\" class=\"slides\">\n\t\t\t<iframe src=\"/?receiver\" width=\"640\" height=\"512\" id=\"next-slide\"></iframe>\n\t\t\t<span>UPCOMING:</span>\n\t\t</div>\n\t\t<div id=\"notes\"></div>\n\n\t\t<script src=\"/socket.io/socket.io.js\"></script>\n\t\t<script src=\"/plugin/markdown/showdown.js\"></script>\n\n\t\t<script>\n\t\tvar socketId = '{{socketId}}';\n\t\tvar socket = io.connect(window.location.origin);\n\t\tvar notes = document.getElementById('notes');\n\t\tvar currentSlide = document.getElementById('current-slide');\n\t\tvar nextSlide = document.getElementById('next-slide');\n\n\t\tsocket.on('slidedata', function(data) {\n\t\t\t// ignore data from sockets that aren't ours\n\t\t\tif (data.socketId !== socketId) { return; }\n\n\t\t\tif (data.markdown) {\n\t\t\t\tnotes.innerHTML = (new Showdown.converter()).makeHtml(data.notes);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnotes.innerHTML = data.notes;\n\t\t\t}\n\n\t\t\tcurrentSlide.contentWindow.Reveal.slide(data.indexh, data.indexv);\n\t\t\tnextSlide.contentWindow.Reveal.slide(data.nextindexh, data.nextindexv);\n\t\t});\n\t\tsocket.on('fragmentdata', function(data) {\n\t\t\t// ignore data from sockets that aren't ours\n\t\t\tif (data.socketId !== socketId) { return; }\n\n\t\t\tif (data.fragment === 'next') {\n\t\t\t\tcurrentSlide.contentWindow.Reveal.nextFragment();\n\t\t\t}\n\t\t\telse if (data.fragment === 'previous') {\n\t\t\t\tcurrentSlide.contentWindow.Reveal.prevFragment();\n\t\t\t}\n\t\t});\n\t\t</script>\n\n\t</body>\n</html>\n"
  },
  {
    "path": "plugin/postmessage/example.html",
    "content": "<html>\n\t<body>\n\n\t\t<iframe id=\"reveal\" src=\"../../index.html\" style=\"border: 0;\" width=\"500\" height=\"500\"></iframe>\n\n\t\t<div>\n\t\t\t<input id=\"back\" type=\"button\" value=\"go back\"/>\n\t\t\t<input id=\"ahead\" type=\"button\" value=\"go ahead\"/>\n\t\t\t<input id=\"slideto\" type=\"button\" value=\"slideto 2-2\"/>\n\t\t</div>\n\n\t\t<script>\n\n\t\t\t(function (){\n\n\t\t\t\tvar back = document.getElementById( 'back' ),\n\t\t\t\t\t\tahead = document.getElementById( 'ahead' ),\n\t\t\t\t\t\tslideto = document.getElementById( 'slideto' ),\n\t\t\t\t\t\treveal =  window.frames[0];\n\n\t\t\t\t\tback.addEventListener( 'click', function () {\n\t\t\t\t\t\t\n\t\t\t\t\treveal.postMessage( JSON.stringify({method: 'prev', args: []}), '*' );\n\t\t\t\t}, false );\n\n\t\t\t\tahead.addEventListener( 'click', function (){\n\t\t\t\t\treveal.postMessage( JSON.stringify({method: 'next', args: []}), '*' );\n\t\t\t\t}, false );\n\n\t\t\t\tslideto.addEventListener( 'click', function (){\n\t\t\t\t\treveal.postMessage( JSON.stringify({method: 'slide', args: [2,2]}), '*' );\n\t\t\t\t}, false );\n\n\t\t\t}());\n\n\t\t</script>\n\n\t</body>\n</html>\n"
  },
  {
    "path": "plugin/postmessage/postmessage.js",
    "content": "/*\n\n\tsimple postmessage plugin\n\n\tUseful when a reveal slideshow is inside an iframe.\n\tIt allows to call reveal methods from outside.\n\n\tExample:\n\t\t var reveal =  window.frames[0];\n\n\t\t // Reveal.prev(); \n\t\t reveal.postMessage(JSON.stringify({method: 'prev', args: []}), '*');\n\t\t // Reveal.next(); \n\t\t reveal.postMessage(JSON.stringify({method: 'next', args: []}), '*');\n\t\t // Reveal.slide(2, 2); \n\t\t reveal.postMessage(JSON.stringify({method: 'slide', args: [2,2]}), '*');\n\n\tAdd to the slideshow:\n\n\t\tdependencies: [\n\t\t\t...\n\t\t\t{ src: 'plugin/postmessage/postmessage.js', async: true, condition: function() { return !!document.body.classList; } }\n\t\t]\n\n*/\n\n(function (){\n\n\twindow.addEventListener( \"message\", function ( event ) {\n\t\tvar data = JSON.parse( event.data ),\n\t\t\t\tmethod = data.method,\n\t\t\t\targs = data.args;\n\n\t\tif( typeof Reveal[method] === 'function' ) {\n\t\t\tReveal[method].apply( Reveal, data.args );\n\t\t}\n\t}, false);\n\n}());\n\n\n\n"
  },
  {
    "path": "plugin/print-pdf/print-pdf.js",
    "content": "/**\n * phantomjs script for printing presentations to PDF.\n *\n * Example:\n * phantomjs print-pdf.js \"http://lab.hakim.se/reveal-js?print-pdf\" reveal-demo.pdf\n *\n * By Manuel Bieh (https://github.com/manuelbieh)\n */\n\n// html2pdf.js\nvar page = new WebPage();\nvar system = require( 'system' );\n\npage.paperSize = {\n\tformat: 'A4',\n\torientation: 'landscape',\n\tmargin: {\n\t\tleft: '0',\n\t\tright: '0',\n\t\ttop: '0',\n\t\tbottom: '0'\n\t}\n};\npage.zoomFactor = 1.5;\n\nvar revealFile = system.args[1] || 'index.html?print-pdf';\nvar slideFile = system.args[2] || 'slides.pdf';\n\nif( slideFile.match( /\\.pdf$/gi ) === null ) {\n\tslideFile += '.pdf';\n}\n\nconsole.log( 'Printing PDF...' );\n\npage.open( revealFile, function( status ) {\n\tconsole.log( 'Printed succesfully' );\n\tpage.render( slideFile );\n\tphantom.exit();\n} );"
  },
  {
    "path": "plugin/remotes/remotes.js",
    "content": "/**\n * Touch-based remote controller for your presentation courtesy \n * of the folks at http://remotes.io\n */\n\n(function(window){\n\n    /**\n     * Detects if we are dealing with a touch enabled device (with some false positives)\n     * Borrowed from modernizr: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touch.js   \n     */\n    var hasTouch  = (function(){\n        return ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch;\n    })();\n\n    if(!hasTouch){\n        head.ready( 'remotes.ne.min.js', function() {\n            new Remotes(\"preview\")\n                .on(\"swipe-left\", function(e){ Reveal.right(); })\n                .on(\"swipe-right\", function(e){ Reveal.left(); })\n                .on(\"swipe-up\", function(e){ Reveal.down(); })\n                .on(\"swipe-down\", function(e){ Reveal.up(); })\n                .on(\"tap\", function(e){ \n                    Reveal.toggleOverview(); \n                });\n        } );\n\n        head.js('https://raw.github.com/Remotes/Remotes/master/dist/remotes.ne.min.js');\n    }\n})(window);"
  },
  {
    "path": "plugin/zoom-js/zoom.js",
    "content": "// Custom reveal.js integration\n(function(){\n\tdocument.querySelector( '.reveal' ).addEventListener( 'click', function( event ) {\n\t\tif( event.altKey ) {\n\t\t\tevent.preventDefault();\n\t\t\tzoom.to({ element: event.target, pan: false });\n\t\t}\n\t} );\n})();\n\n/*!\n * zoom.js 0.2 (modified version for use with reveal.js)\n * http://lab.hakim.se/zoom-js\n * MIT licensed\n * \n * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se\n */\nvar zoom = (function(){\n\n\t// The current zoom level (scale)\n\tvar level = 1;\n\t\n\t// The current mouse position, used for panning\n\tvar mouseX = 0,\n\t\tmouseY = 0;\n\t\n\t// Timeout before pan is activated\n\tvar panEngageTimeout = -1,\n\t\tpanUpdateInterval = -1;\n\n\tvar currentOptions = null;\n\n\t// Check for transform support so that we can fallback otherwise\n\tvar supportsTransforms = \t'WebkitTransform' in document.body.style ||\n\t\t\t\t\t\t\t\t'MozTransform' in document.body.style ||\n\t\t\t\t\t\t\t\t'msTransform' in document.body.style ||\n\t\t\t\t\t\t\t\t'OTransform' in document.body.style ||\n\t\t\t\t\t\t\t\t'transform' in document.body.style;\n    \n\tif( supportsTransforms ) {\n\t\t// The easing that will be applied when we zoom in/out\n\t\tdocument.body.style.transition = 'transform 0.8s ease';\n\t\tdocument.body.style.OTransition = '-o-transform 0.8s ease';\n\t\tdocument.body.style.msTransition = '-ms-transform 0.8s ease';\n\t\tdocument.body.style.MozTransition = '-moz-transform 0.8s ease';\n\t\tdocument.body.style.WebkitTransition = '-webkit-transform 0.8s ease';\n\t}\n\t\n\t// Zoom out if the user hits escape\n\tdocument.addEventListener( 'keyup', function( event ) {\n\t\tif( level !== 1 && event.keyCode === 27 ) {\n\t\t\tzoom.out();\n\t\t}\n\t}, false );\n\n\t// Monitor mouse movement for panning\n\tdocument.addEventListener( 'mousemove', function( event ) {\n\t\tif( level !== 1 ) {\n\t\t\tmouseX = event.clientX;\n\t\t\tmouseY = event.clientY;\n\t\t}\n\t}, false );\n\n\t/**\n\t * Applies the CSS required to zoom in, prioritizes use of CSS3 \n\t * transforms but falls back on zoom for IE.\n\t * \n\t * @param {Number} pageOffsetX \n\t * @param {Number} pageOffsetY \n\t * @param {Number} elementOffsetX \n\t * @param {Number} elementOffsetY \n\t * @param {Number} scale \n\t */\n\tfunction magnify( pageOffsetX, pageOffsetY, elementOffsetX, elementOffsetY, scale ) {\n\n\t\tif( supportsTransforms ) {\n\t\t\tvar origin = pageOffsetX +'px '+ pageOffsetY +'px',\n\t\t\t\ttransform = 'translate('+ -elementOffsetX +'px,'+ -elementOffsetY +'px) scale('+ scale +')';\n\t\t\t\n\t\t\tdocument.body.style.transformOrigin = origin;\n\t\t\tdocument.body.style.OTransformOrigin = origin;\n\t\t\tdocument.body.style.msTransformOrigin = origin;\n\t\t\tdocument.body.style.MozTransformOrigin = origin;\n\t\t\tdocument.body.style.WebkitTransformOrigin = origin;\n\n\t\t\tdocument.body.style.transform = transform;\n\t\t\tdocument.body.style.OTransform = transform;\n\t\t\tdocument.body.style.msTransform = transform;\n\t\t\tdocument.body.style.MozTransform = transform;\n\t\t\tdocument.body.style.WebkitTransform = transform;\n\t\t}\n\t\telse {\n\t\t\t// Reset all values\n\t\t\tif( scale === 1 ) {\n\t\t\t\tdocument.body.style.position = '';\n\t\t\t\tdocument.body.style.left = '';\n\t\t\t\tdocument.body.style.top = '';\n\t\t\t\tdocument.body.style.width = '';\n\t\t\t\tdocument.body.style.height = '';\n\t\t\t\tdocument.body.style.zoom = '';\n\t\t\t}\n\t\t\t// Apply scale\n\t\t\telse {\n\t\t\t\tdocument.body.style.position = 'relative';\n\t\t\t\tdocument.body.style.left = ( - ( pageOffsetX + elementOffsetX ) / scale ) + 'px';\n\t\t\t\tdocument.body.style.top = ( - ( pageOffsetY + elementOffsetY ) / scale ) + 'px';\n\t\t\t\tdocument.body.style.width = ( scale * 100 ) + '%';\n\t\t\t\tdocument.body.style.height = ( scale * 100 ) + '%';\n\t\t\t\tdocument.body.style.zoom = scale;\n\t\t\t}\n\t\t}\n\n\t\tlevel = scale;\n\n\t\tif( level !== 1 && document.documentElement.classList ) {\n\t\t\tdocument.documentElement.classList.add( 'zoomed' );\n\t\t}\n\t\telse {\n\t\t\tdocument.documentElement.classList.remove( 'zoomed' );\n\t\t}\n\t}\n\n\t/**\n\t * Pan the document when the mosue cursor approaches the edges \n\t * of the window.\n\t */\n\tfunction pan() {\n\t\tvar range = 0.12,\n\t\t\trangeX = window.innerWidth * range,\n\t\t\trangeY = window.innerHeight * range,\n\t\t\tscrollOffset = getScrollOffset();\n\t\t\n\t\t// Up\n\t\tif( mouseY < rangeY ) {\n\t\t\twindow.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );\n\t\t}\n\t\t// Down\n\t\telse if( mouseY > window.innerHeight - rangeY ) {\n\t\t\twindow.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );\n\t\t}\n\n\t\t// Left\n\t\tif( mouseX < rangeX ) {\n\t\t\twindow.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );\n\t\t}\n\t\t// Right\n\t\telse if( mouseX > window.innerWidth - rangeX ) {\n\t\t\twindow.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );\n\t\t}\n\t}\n\n\tfunction getScrollOffset() {\n\t\treturn {\n\t\t\tx: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,\n\t\t\ty: window.scrollY !== undefined ? window.scrollY : window.pageXYffset\n\t\t}\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Zooms in on either a rectangle or HTML element.\n\t\t * \n\t\t * @param {Object} options\n\t\t *   - element: HTML element to zoom in on\n\t\t *   OR\n\t\t *   - x/y: coordinates in non-transformed space to zoom in on\n\t\t *   - width/height: the portion of the screen to zoom in on\n\t\t *   - scale: can be used instead of width/height to explicitly set scale\n\t\t */\n\t\tto: function( options ) {\n\t\t\t// Due to an implementation limitation we can't zoom in\n\t\t\t// to another element without zooming out first\n\t\t\tif( level !== 1 ) {\n\t\t\t\tzoom.out();\n\t\t\t}\n\t\t\telse {\n\t\t\t\toptions.x = options.x || 0;\n\t\t\t\toptions.y = options.y || 0;\n\n\t\t\t\t// If an element is set, that takes precedence\n\t\t\t\tif( !!options.element ) {\n\t\t\t\t\t// Space around the zoomed in element to leave on screen\n\t\t\t\t\tvar padding = 20;\n\n\t\t\t\t\toptions.width = options.element.getBoundingClientRect().width + ( padding * 2 );\n\t\t\t\t\toptions.height = options.element.getBoundingClientRect().height + ( padding * 2 );\n\t\t\t\t\toptions.x = options.element.getBoundingClientRect().left - padding;\n\t\t\t\t\toptions.y = options.element.getBoundingClientRect().top - padding;\n\t\t\t\t}\n\n\t\t\t\t// If width/height values are set, calculate scale from those values\n\t\t\t\tif( options.width !== undefined && options.height !== undefined ) {\n\t\t\t\t\toptions.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 );\n\t\t\t\t}\n\n\t\t\t\tif( options.scale > 1 ) {\n\t\t\t\t\toptions.x *= options.scale;\n\t\t\t\t\toptions.y *= options.scale;\n\n\t\t\t\t\tvar scrollOffset = getScrollOffset();\n\n\t\t\t\t\tif( options.element ) {\n\t\t\t\t\t\tscrollOffset.x -= ( window.innerWidth - ( options.width * options.scale ) ) / 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tmagnify( scrollOffset.x, scrollOffset.y, options.x, options.y, options.scale );\n\n\t\t\t\t\tif( options.pan !== false ) {\n\n\t\t\t\t\t\t// Wait with engaging panning as it may conflict with the\n\t\t\t\t\t\t// zoom transition\n\t\t\t\t\t\tpanEngageTimeout = setTimeout( function() {\n\t\t\t\t\t\t\tpanUpdateInterval = setInterval( pan, 1000 / 60 );\n\t\t\t\t\t\t}, 800 );\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcurrentOptions = options;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Resets the document zoom state to its default.\n\t\t */\n\t\tout: function() {\n\t\t\tclearTimeout( panEngageTimeout );\n\t\t\tclearInterval( panUpdateInterval );\n\n\t\t\tvar scrollOffset = getScrollOffset();\n\n\t\t\tif( currentOptions && currentOptions.element ) {\n\t\t\t\tscrollOffset.x -= ( window.innerWidth - ( currentOptions.width * currentOptions.scale ) ) / 2;\n\t\t\t}\n\t\t\t\n\t\t\tmagnify( scrollOffset.x, scrollOffset.y, 0, 0, 1 );\n\n\t\t\tlevel = 1;\n\t\t},\n\n\t\t// Alias\n\t\tmagnify: function( options ) { this.to( options ) },\n\t\treset: function() { this.out() },\n\t\t\n\t\tzoomLevel: function() {\n\t\t\treturn level;\n\t\t}\n\t}\n\t\n})();\n\n"
  },
  {
    "path": "requirements.txt",
    "content": "flask\n"
  },
  {
    "path": "run.py",
    "content": "#coding=utf-8\nimport os\nfrom flask import Flask, render_template, send_from_directory\n\ntmpl_dir = os.path.dirname(os.path.abspath(__file__))\napp = Flask(__name__, template_folder=tmpl_dir, static_folder=tmpl_dir)\n\n\n@app.route('/')\ndef main():\n    return render_template('index.html')\n\n\n@app.route('/<path:filename>')\ndef static_url(filename):\n    return send_from_directory(app.static_folder, filename)\n\n\nif __name__ == '__main__':\n    app.run(host='0.0.0.0', port=80)\n"
  }
]