├── .gitignore ├── pdf ├── cheatsheet-a4-bw.pdf ├── cljs-cheatsheet.pdf ├── cheatsheet-a4-grey.pdf ├── cheatsheet-a4-color.pdf ├── cheatsheet-usletter-bw.pdf ├── cheatsheet-usletter-color.pdf └── cheatsheet-usletter-grey.pdf ├── src ├── clj-jvm │ ├── revert-html-files.sh │ ├── scripts │ │ ├── clj-meta-checks.sh │ │ └── run.sh │ ├── deps.edn │ ├── project.clj │ ├── resources │ │ └── inline.css │ ├── cheatsheet_files │ │ ├── tipTip.css │ │ ├── jquery.tipTip.js │ │ ├── style.css │ │ └── jquery.js │ ├── test │ │ └── generator │ │ │ └── core_test.clj │ ├── scratch.clj │ ├── src │ │ └── generator │ │ │ └── clojure_metadata_checks.clj │ ├── README.markdown │ ├── unused-symbols.txt │ ├── TODO.txt │ └── CHANGELOG.txt └── cljs-cheatsheet.tex └── README.markdown /.gitignore: -------------------------------------------------------------------------------- 1 | src/*.aux 2 | src/*.log 3 | src/*.pdf 4 | src/*.gz 5 | 6 | -------------------------------------------------------------------------------- /pdf/cheatsheet-a4-bw.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-a4-bw.pdf -------------------------------------------------------------------------------- /pdf/cljs-cheatsheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cljs-cheatsheet.pdf -------------------------------------------------------------------------------- /pdf/cheatsheet-a4-grey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-a4-grey.pdf -------------------------------------------------------------------------------- /pdf/cheatsheet-a4-color.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-a4-color.pdf -------------------------------------------------------------------------------- /pdf/cheatsheet-usletter-bw.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-usletter-bw.pdf -------------------------------------------------------------------------------- /pdf/cheatsheet-usletter-color.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-usletter-color.pdf -------------------------------------------------------------------------------- /pdf/cheatsheet-usletter-grey.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure-cheatsheets/master/pdf/cheatsheet-usletter-grey.pdf -------------------------------------------------------------------------------- /src/clj-jvm/revert-html-files.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | git checkout cheatsheet-embeddable-for-clojure.org.html cheatsheet-no-tooltips-no-cdocs-summary.html cheatsheet-tiptip-cdocs-summary.html cheatsheet-tiptip-no-cdocs-summary.html cheatsheet-use-title-attribute-cdocs-summary.html cheatsheet-use-title-attribute-no-cdocs-summary.html 4 | -------------------------------------------------------------------------------- /src/clj-jvm/scripts/clj-meta-checks.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | #clojure -X generator.clojure-metadata-checks/print-results 4 | 5 | # Some of the new public Vars that have been added in recent releases 6 | # of Clojure, but do not have :added metadata, are reported in this 7 | # Clojure JIRA: https://clojure.atlassian.net/browse/CLJ-2601 8 | 9 | set -x 10 | for ver in 1.6.0 1.7.0 1.8.0 1.9.0 1.10.3 1.11.1 11 | do 12 | clojure -Sdeps "{:deps {org.clojure/clojure {:mvn/version \"${ver}\"}}}" -M --main generator.clojure-metadata-checks > check-${ver}.txt 13 | done 14 | -------------------------------------------------------------------------------- /src/clj-jvm/deps.edn: -------------------------------------------------------------------------------- 1 | {:paths ["src" "resources"] 2 | :deps {org.clojure/data.json {:mvn/version "2.4.0"} 3 | org.clojure/core.async {:mvn/version "1.5.648"} 4 | org.clojure/data.priority-map {:mvn/version "1.1.0"} 5 | org.clojure/data.avl {:mvn/version "0.1.0"} 6 | org.clojure/data.int-map {:mvn/version "1.0.0"} 7 | org.clojure/tools.reader {:mvn/version "1.3.6"} 8 | org.flatland/ordered {:mvn/version "1.15.10"} 9 | org.flatland/useful {:mvn/version "0.11.6"} 10 | org.clojure/test.check {:mvn/version "1.1.1"}}} 11 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | # clojure-cheatsheets 2 | 3 | Clojure cheatsheets in HTML, PDF, and TeX formats. 4 | 5 | See [https://jafingerhut.github.io](https://jafingerhut.github.io) for 6 | several variants of the HTML cheatsheet for Clojure on the JVM. 7 | 8 | ## License 9 | 10 | Copyright (C) 2012-2022 Michael Fogus, Andy Fingerhut 11 | 12 | Distributed under the Eclipse Public License, the same as Clojure, 13 | except for the following parts. 14 | 15 | The TipTip jQuery Plugin, slightly modified from the version 16 | distributed here by Drew Wilson, dual licensed under the MIT and GPL 17 | licenses: 18 | 19 | http://code.drewwilson.com/entry/tiptip-jquery-plugin 20 | 21 | jQuery is distributed under either the MIT or GPL version 2 license: 22 | 23 | http://jquery.org/license 24 | -------------------------------------------------------------------------------- /src/clj-jvm/project.clj: -------------------------------------------------------------------------------- 1 | (defproject generator "0.1.0" 2 | :description "FIXME: write description" 3 | :url "http://example.com/FIXME" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.11.1"] 7 | [org.clojure/data.json "2.4.0"] 8 | [org.clojure/core.async "1.5.648"] 9 | [org.clojure/data.priority-map "1.1.0"] 10 | [org.clojure/data.avl "0.1.0"] 11 | [org.clojure/data.int-map "1.0.0"] 12 | [org.clojure/tools.reader "1.3.6"] 13 | [org.flatland/ordered "1.15.10"] 14 | [org.flatland/useful "0.11.6"] 15 | [org.clojure/test.check "1.1.1"]] 16 | :main generator.generator) 17 | -------------------------------------------------------------------------------- /src/clj-jvm/resources/inline.css: -------------------------------------------------------------------------------- 1 | code { 2 | font-family: monospace; 3 | } 4 | 5 | .page { 6 | page-break-after: always; 7 | page-break-inside: avoid; 8 | } 9 | 10 | .column { 11 | float: left; 12 | padding: 0; 13 | margin: 0; 14 | width: 50%; 15 | } 16 | 17 | .column:first-child { 18 | clear: both; 19 | } 20 | 21 | .header { 22 | text-align: center; 23 | } 24 | 25 | .header h2 { 26 | font-style: italic; 27 | } 28 | 29 | h1 { 30 | font-size: 1.8em; 31 | } 32 | 33 | h2 { 34 | font-size: 1.4em; 35 | } 36 | 37 | h3 { 38 | font-size: 1.2em; 39 | } 40 | 41 | .section { 42 | background-color: #ebebeb; 43 | margin: 0.5em; 44 | padding: 0 0.5em 0.5em; 45 | } 46 | 47 | table { 48 | width: 100%; 49 | border-collapse: collapse; 50 | } 51 | 52 | td, .single_row { 53 | vertical-align: top; 54 | padding: 0 0.5em; 55 | } 56 | 57 | tr.odd, .single_row { 58 | background-color: #f5f5f5; 59 | } 60 | 61 | tr.even { 62 | background-color: #fafafa; 63 | } 64 | 65 | .footer { 66 | float: right; 67 | text-align: right; 68 | border-top: 1px solid gray; 69 | } 70 | 71 | #foot { 72 | clear: both; 73 | } 74 | -------------------------------------------------------------------------------- /src/clj-jvm/cheatsheet_files/tipTip.css: -------------------------------------------------------------------------------- 1 | /* TipTip CSS - Version 1.2 */ 2 | 3 | #tiptip_holder { 4 | display: none; 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: 99999; 9 | } 10 | 11 | #tiptip_holder.tip_top { 12 | padding-bottom: 15px; 13 | } 14 | 15 | #tiptip_holder.tip_bottom { 16 | padding-top: 15px; 17 | } 18 | 19 | #tiptip_holder.tip_right { 20 | padding-left: 15px; 21 | } 22 | 23 | #tiptip_holder.tip_left { 24 | padding-right: 15px; 25 | } 26 | 27 | #tiptip_content { 28 | font-size: 12px; 29 | color: #fff; 30 | text-shadow: 0 0 2px #000; 31 | padding: 4px 8px; 32 | border: 1px solid rgba(255,255,255,0.25); 33 | background-color: rgb(35,35,35); 34 | border-radius: 3px; 35 | -webkit-border-radius: 3px; 36 | -moz-border-radius: 3px; 37 | box-shadow: 0 0 3px #555; 38 | -webkit-box-shadow: 0 0 3px #555; 39 | -moz-box-shadow: 0 0 3px #555; 40 | width: 580px; 41 | } 42 | 43 | #tiptip_arrow, #tiptip_arrow_inner { 44 | position: absolute; 45 | border-color: transparent; 46 | border-style: solid; 47 | border-width: 6px; 48 | height: 0; 49 | width: 0; 50 | } 51 | 52 | #tiptip_holder.tip_top #tiptip_arrow { 53 | border-top-color: #fff; 54 | } 55 | 56 | #tiptip_holder.tip_bottom #tiptip_arrow { 57 | border-bottom-color: #fff; 58 | } 59 | 60 | #tiptip_holder.tip_right #tiptip_arrow { 61 | border-right-color: #fff; 62 | } 63 | 64 | #tiptip_holder.tip_left #tiptip_arrow { 65 | border-left-color: #fff; 66 | } 67 | 68 | #tiptip_holder.tip_top #tiptip_arrow_inner { 69 | margin-top: -7px; 70 | margin-left: -6px; 71 | border-top-color: rgb(25,25,25); 72 | } 73 | 74 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { 75 | margin-top: -5px; 76 | margin-left: -6px; 77 | border-bottom-color: rgb(25,25,25); 78 | } 79 | 80 | #tiptip_holder.tip_right #tiptip_arrow_inner { 81 | margin-top: -6px; 82 | margin-left: -5px; 83 | border-right-color: rgb(25,25,25); 84 | } 85 | 86 | #tiptip_holder.tip_left #tiptip_arrow_inner { 87 | margin-top: -6px; 88 | margin-left: -7px; 89 | border-left-color: rgb(25,25,25); 90 | } 91 | 92 | /* Webkit Hacks */ 93 | @media screen and (-webkit-min-device-pixel-ratio:0) { 94 | #tiptip_content { 95 | padding: 4px 8px 5px 8px; 96 | background-color: rgba(45,45,45,1.0); 97 | } 98 | #tiptip_holder.tip_bottom #tiptip_arrow_inner { 99 | border-bottom-color: rgba(45,45,45,1.0); 100 | } 101 | #tiptip_holder.tip_top #tiptip_arrow_inner { 102 | border-top-color: rgba(20,20,20,1.0); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/clj-jvm/scripts/run.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | CMD="lein run" 4 | 5 | set -x 6 | 7 | # 3 choices for links: none, to clojure.github.org, or to 8 | # clojuredocs.org: 9 | 10 | #LINK_TARGET=nolinks 11 | #LINK_TARGET=links-to-clojure 12 | LINK_TARGET=links-to-clojuredocs 13 | #LINK_TARGET=links-to-grimoire 14 | 15 | TOOLTIPS=no-tooltips 16 | #TOOLTIPS=use-title-attribute 17 | #TOOLTIPS=tiptip 18 | 19 | CLOJUREDOCS_SNAPSHOT="" 20 | #CLOJUREDOCS_SNAPSHOT="$clojuredocs-snapshot.edn" 21 | 22 | # Optionally produce PDF files by running LaTeX. See README.markdown 23 | # for notes on what parts of LaTeX are enough for this to work. 24 | 25 | #PRODUCE_PDF="no" 26 | PRODUCE_PDF="yes" 27 | 28 | ###################################################################### 29 | # Make embeddable version for clojure.org/cheatsheet 30 | ###################################################################### 31 | echo "Generating embeddable version for clojure.org/cheatsheet ..." 32 | ${CMD} links-to-clojuredocs use-title-attribute 33 | EXIT_STATUS=$? 34 | 35 | if [ ${EXIT_STATUS} != 0 ] 36 | then 37 | echo "Exit status ${EXIT_STATUS} from ${CMD}" 38 | exit ${EXIT_STATUS} 39 | fi 40 | /bin/mv cheatsheet-embeddable.html cheatsheet-embeddable-for-clojure.org.html 41 | 42 | if [ ${PRODUCE_PDF} == "yes" ] 43 | then 44 | for PAPER in a4 usletter 45 | do 46 | for COLOR in color grey bw 47 | do 48 | BASENAME="cheatsheet-${PAPER}-${COLOR}" 49 | latex ${BASENAME} 50 | dvipdfm ${BASENAME} 51 | 52 | # Clean up some files created by latex 53 | /bin/rm -f ${BASENAME}.aux ${BASENAME}.dvi ${BASENAME}.log ${BASENAME}.out 54 | done 55 | done 56 | /bin/mv *.pdf ../../pdf 57 | fi 58 | 59 | # Useful to uncomment this, to generate LaTeX and PDF only, for faster 60 | # iteration on problems with LaTeX files. 61 | #exit 0 62 | 63 | ###################################################################### 64 | # Make multiple full versions for those who prefer something else, 65 | # e.g. no tooltips. 66 | ###################################################################### 67 | for TOOLTIPS in tiptip use-title-attribute no-tooltips 68 | do 69 | for CDOCS_SUMMARY in cdocs-summary no-cdocs-summary 70 | do 71 | case "${CDOCS_SUMMARY}" in 72 | no-cdocs-summary) CLOJUREDOCS_SNAPSHOT="" 73 | ;; 74 | cdocs-summary) CLOJUREDOCS_SNAPSHOT="clojuredocs-export.json" 75 | ;; 76 | esac 77 | TARGET="cheatsheet-${TOOLTIPS}-${CDOCS_SUMMARY}.html" 78 | echo "Generating ${TARGET} ..." 79 | ${CMD} ${LINK_TARGET} ${TOOLTIPS} ${CLOJUREDOCS_SNAPSHOT} 80 | EXIT_STATUS=$? 81 | 82 | if [ ${EXIT_STATUS} != 0 ] 83 | then 84 | echo "Exit status ${EXIT_STATUS} from ${CMD}" 85 | exit ${EXIT_STATUS} 86 | fi 87 | /bin/mv cheatsheet-full.html cheatsheet-${TOOLTIPS}-${CDOCS_SUMMARY}.html 88 | # Uncomment following line if you want to test new changes 89 | # with generating only the first variant of the cheatsheet. 90 | #exit 0 91 | done 92 | done 93 | -------------------------------------------------------------------------------- /src/clj-jvm/test/generator/core_test.clj: -------------------------------------------------------------------------------- 1 | (ns generator.core-test 2 | (:require [clojure.test :refer :all] 3 | [generator.core :refer :all])) 4 | 5 | 6 | (deftest test-table-cmds-to-str 7 | (doseq [expand? [false true]] 8 | (let [most-opts {:fmt :html 9 | :colors :color 10 | :symbol-name-to-url (hash-from-pairs 11 | (symbol-url-pairs :links-to-grimoire)) 12 | :tooltips :no-tooltips 13 | :clojuredocs-snapshot {} 14 | } 15 | opts (merge most-opts 16 | {:expand-common-prefixes-or-suffixes expand?})] 17 | 18 | (testing (str "expand? " expand? " String that is not a symbol. Should pass through unchanged.") 19 | (is (= (table-cmds-to-str opts "(1.6)") 20 | "(1.6)"))) 21 | 22 | (testing (str "expand? " expand? " Single symbol that is a clojure.core var. Gets a URL associated with it.") 23 | (is (= (table-cmds-to-str opts 'bit-and) 24 | "bit-and"))) 25 | 26 | (testing (str "expand? " expand? " Several symbols with :common-prefix") 27 | (is (= (table-cmds-to-str opts '[:common-prefix bit- and or]) 28 | (if expand? 29 | (str "bit-and" 30 | " " 31 | "bit-or") 32 | (str "bit-" 33 | "{" 34 | "and" 35 | ", " 36 | "or" 37 | "}"))))) 38 | 39 | (testing (str "expand? " expand? " Several symbols with :common-suffix") 40 | (is (= (table-cmds-to-str 41 | opts '[:common-suffix -thread-bindings get push]) 42 | (if expand? 43 | (str "get-thread-bindings" 44 | " " 45 | "push-thread-bindings") 46 | (str "{" 47 | "get" 48 | ", " 49 | "push" 50 | "}" 51 | "-thread-bindings"))))) 52 | 53 | (testing (str "expand? " expand? " Several symbols with :common-prefix-suffix") 54 | (is (= (table-cmds-to-str 55 | opts '[:common-prefix-suffix unchecked- -int add dec]) 56 | (if expand? 57 | (str "unchecked-add-int" 58 | " " 59 | "unchecked-dec-int") 60 | (str "unchecked-" 61 | "{" 62 | "add" 63 | ", " 64 | "dec" 65 | "}" 66 | "-int"))))) 67 | ))) 68 | -------------------------------------------------------------------------------- /src/clj-jvm/scratch.clj: -------------------------------------------------------------------------------- 1 | (require '[generator.core :as g] 2 | '[clojure.data.json :as json] 3 | '[clojure.string :as str] 4 | '[clojure.java.io :as io]) 5 | 6 | (pprint (ns-publics 'clojure.data.json)) 7 | (doc json/read-json) 8 | (doc sorted-set) 9 | 10 | (pst) 11 | 12 | (def fname1 "clojuredocs-snapshot.edn") 13 | (def d1 (g/read-safely fname1)) 14 | 15 | (def fname5 "clojuredocs-export.json") 16 | (def d5 (json/read-json (io/reader fname5))) 17 | 18 | (:created-at d5) 19 | (def java-date (java.util.Date. (:created-at d5))) 20 | java-date 21 | ;; This is the format that :snapshot-time is in clojuredocs-snapshot.edn 22 | ;; {:snapshot-time "Fri Aug 29 06:53:55 PDT 2014", 23 | (.getDay java-date) 24 | (.getMonth java-date) 25 | (.getHours java-date) 26 | (.toGMTString java-date) 27 | ;; "20 Nov 2018 23:55:16 GMT" 28 | (.toLocaleString java-date) 29 | ;; "Nov 20, 2018, 3:55:16 PM" 30 | (.toString java-date) 31 | ;; "Tue Nov 20 15:55:16 PST 2018" 32 | (def java-inst (.toInstant java-date)) 33 | java-inst 34 | ;; #object[java.time.Instant 0x20d059cb "2018-11-20T23:55:16.890Z"] 35 | (def utc-zoneoffset java.time.ZoneOffset/UTC) 36 | utc-zoneoffset 37 | 38 | (def java-zoneddatetime (.atZone java-inst utc-zoneoffset)) 39 | (.toString java-zoneddatetime) 40 | (def formatter (java.time.format.DateTimeFormatter/ofPattern "EEE MMM dd HH:mm:ss yyyy")) 41 | (.format java-zoneddatetime formatter) 42 | 43 | (java.time.ZoneOffset/of "-8") 44 | 45 | 46 | (def snap-time (g/epoch-millis->utc-time-date-string (:created-at d5))) 47 | snap-time 48 | (def snap-time2 (g/simplify-time-str snap-time)) 49 | snap-time2 50 | 51 | (def sym-info (update-in (nth (:vars d5) 3) 52 | [:see-alsos] add-see-also-names)) 53 | 54 | (g/clojuredocs-content-summary snap-time2 sym-info) 55 | 56 | (def d5b (g/read-clojuredocs-export-json fname5)) 57 | 58 | (g/epoch-millis->utc-time-date-string 1542758116890) 59 | ;; "Tue Nov 20 23:55:16 Z 2018" 60 | (g/epoch-millis->utc-time-date-string 1577062122059) 61 | ;; "Mon Dec 23 00:48:42 Z 2019" 62 | 63 | (re-find #"^(\S+ \S+ \d+)\s+.*\s+(\d+)$" s1) 64 | 65 | (defn remove-uninteresting-keys [x] 66 | (dissoc x :added :file :line :column 67 | :macro :special-form :static :dynamic 68 | :arglists :forms :deprecated :tag :type :url)) 69 | 70 | (def d5b (assoc d5 :vars (mapv remove-uninteresting-keys (:vars d5)))) 71 | (frequencies (map (fn [x] (apply sorted-set (keys x))) (:vars d5b))) 72 | 73 | (type (first (:vars d5))) 74 | (keys (first (:vars d5))) 75 | (keys (dissoc (first (:vars d5)) :href :arglists)) 76 | (keys (remove-uninteresting-keys (first (:vars d5)))) 77 | 78 | (frequencies (map (fn [x] (:type x)) (:vars d5))) 79 | (frequencies (map (fn [x] (type (:column x))) (:vars d5b))) 80 | ;; {"var" 146, "function" 1065, "macro" 185} 81 | 82 | 83 | (keys d5) 84 | (frequencies (map (fn [x] (type (:column x))) (:vars d5b))) 85 | 86 | (def fname2 "export.edn") 87 | (def fname3 "export.compact.edn") 88 | (def fname4 "export.compact.min.edn") 89 | (def d2 (g/read-safely fname2)) 90 | (def d3 (g/read-safely fname3)) 91 | (def d4 (g/read-safely fname4)) 92 | (= d3 d4) 93 | ;; true 94 | 95 | (count d1) 96 | (keys d1) 97 | (def d2 (-> d1 :snapshot-info)) 98 | (type d2) 99 | ;; map 100 | (count d2) 101 | 102 | (frequencies (map type (keys d2))) 103 | ;; {java.lang.String 3574} 104 | 105 | (frequencies (map type (vals d2))) 106 | ;; {clojure.lang.PersistentArrayMap 3574} 107 | 108 | (frequencies (map (fn [m] (-> m keys set)) (vals d2))) 109 | ;; {#{:ns :name :comments :see-alsos :examples :id :url} 3574} 110 | 111 | (frequencies (map (fn [m] (-> m :ns type)) (vals d2))) 112 | ;; {java.lang.String 3574} 113 | 114 | (frequencies (map (fn [m] (-> m :name type)) (vals d2))) 115 | ;; {java.lang.String 3574} 116 | 117 | (frequencies (map (fn [m] (-> m :comments type)) (vals d2))) 118 | ;; {clojure.lang.PersistentVector 3444, clojure.lang.PersistentList 130} 119 | 120 | (def nec (filter #(not (empty? %)) (map (fn [m] (-> m :comments)) (vals d2)))) 121 | (count nec) 122 | 123 | (pprint (take 3 nec)) 124 | (frequencies (map count nec)) 125 | -------------------------------------------------------------------------------- /src/clj-jvm/src/generator/clojure_metadata_checks.clj: -------------------------------------------------------------------------------- 1 | (ns generator.clojure-metadata-checks) 2 | 3 | (set! *warn-on-reflection* true) 4 | 5 | 6 | 7 | (def ^:dynamic *auto-flush* true) 8 | 9 | ;; The list below was created by starting with the list of all 10 | ;; namespaces in a Clojure 1.10.0-RC1 run, with no dependencies other 11 | ;; than the spec ones that Clojure needs to run, using these commands: 12 | 13 | ;; $ clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-RC1"}}}' 14 | ;; Clojure 1.10.0-RC1 15 | ;; user=> (pprint (->> (all-ns) (map str) sort)) 16 | 17 | ;; That list was then augmented by grep'ing all .clj files in the 18 | ;; Clojure 1.10.0-RC2 source code for 'ns' forms. Not all namespaces 19 | ;; included in Clojure are loaded by default using the commands above. 20 | 21 | ;; See also +common-namespaces-to-remove-from-shown-symbols+ 22 | 23 | (def all-clojure-built-in-namespaces 24 | '[clojure.core 25 | clojure.core.protocols 26 | clojure.core.reducers 27 | clojure.core.server 28 | clojure.core.specs.alpha 29 | clojure.data 30 | clojure.datafy 31 | clojure.edn 32 | clojure.inspector 33 | clojure.instant 34 | clojure.java.browse 35 | clojure.java.browse-ui 36 | clojure.java.io 37 | clojure.java.javadoc 38 | clojure.java.shell 39 | clojure.main 40 | clojure.math 41 | ;; clojure.parallel - deprecated, so leave out 42 | clojure.pprint 43 | clojure.reflect 44 | clojure.repl 45 | clojure.set 46 | clojure.stacktrace 47 | clojure.string 48 | clojure.template 49 | clojure.test 50 | clojure.test.junit 51 | clojure.test.tap 52 | clojure.uuid 53 | clojure.walk 54 | clojure.xml 55 | clojure.zip 56 | 57 | ;; These are not built into Clojure itself, but _are_ depended on 58 | ;; by Clojure 59 | clojure.spec.alpha 60 | clojure.spec.gen.alpha 61 | ]) 62 | 63 | 64 | (defn printf-to-writer [w fmt-str & args] 65 | (binding [*out* w] 66 | (apply clojure.core/printf fmt-str args) 67 | (when *auto-flush* (flush)))) 68 | 69 | 70 | (defn iprintf [fmt-str-or-writer & args] 71 | (if (instance? CharSequence fmt-str-or-writer) 72 | (apply printf-to-writer *out* fmt-str-or-writer args) 73 | (apply printf-to-writer fmt-str-or-writer args))) 74 | 75 | 76 | (defn public-vars-in-ns [ns] 77 | (vals (ns-publics ns))) 78 | 79 | (defn all-loaded-public-vars [] 80 | (mapcat public-vars-in-ns (all-ns))) 81 | 82 | (defn try-require-nss [nss] 83 | (loop [nss nss 84 | ret []] 85 | (if-let [s (seq nss)] 86 | (let [err (try 87 | (require (first s)) 88 | nil 89 | (catch Exception e 90 | e))] 91 | (recur (rest s) (conj ret {:ns (first s), 92 | :err err}))) 93 | ret))) 94 | 95 | (defn print-results [m] 96 | (let [wrtr *out*] 97 | (iprintf wrtr "Clojure version: %s\n" (clojure-version)) 98 | (iprintf wrtr "Requiring namespaces ...\n") 99 | (let [nss-results (try-require-nss all-clojure-built-in-namespaces) 100 | _ (doseq [{:keys [ns err]} nss-results] 101 | (iprintf wrtr " %s ... %s\n" 102 | ns (if err "exception" "ok"))) 103 | nss-successfully-loaded (->> nss-results 104 | (filter #(nil? (:err %))) 105 | (map :ns)) 106 | all-ns-names-sorted (->> (all-ns) (map str) sort) 107 | public-var-no-docstring (remove #(contains? (meta %) :doc) 108 | (all-loaded-public-vars)) 109 | public-builtin-vars-no-added-meta (remove #(contains? (meta %) :added) 110 | (mapcat public-vars-in-ns nss-successfully-loaded))] 111 | (iprintf wrtr "\n\nSorted list of %d namespace names currently existing:\n\n" 112 | (count all-ns-names-sorted)) 113 | (doseq [s all-ns-names-sorted] 114 | (iprintf wrtr "%s\n" s)) 115 | (iprintf wrtr "\n\nSorted list of %d public Vars in all currently loaded namespaces that have no doc string:\n\n" 116 | (count public-var-no-docstring)) 117 | (doseq [var (sort-by str public-var-no-docstring)] 118 | (iprintf wrtr "%s\n" var)) 119 | (iprintf wrtr "\n\nSorted list of %d public Vars in namespaces built into Clojure that has no :added metadata:\n\n" 120 | (count public-builtin-vars-no-added-meta)) 121 | (doseq [var (sort-by str public-builtin-vars-no-added-meta)] 122 | (iprintf wrtr "%s\n" var))))) 123 | 124 | (defn -main [& args] 125 | (print-results {})) 126 | 127 | (comment 128 | 129 | (clojure-version) 130 | (require '[generator.clojure-metadata-checks :as mc]) 131 | (use 'clojure.pprint) 132 | (use 'clojure.repl) 133 | (in-ns 'generator.clojure-metadata-checks) 134 | (print-results {}) 135 | (pst) 136 | 137 | (map class all-clojure-built-in-namespaces) 138 | (nth all-clojure-built-in-namespaces 1) 139 | (pprint (sort-by str (all-ns))) 140 | 141 | (def sym1 'clojure.data) 142 | (require sym1) 143 | 144 | (doseq [sym '[clojure.core.reducers]] 145 | (println " " sym "...") 146 | (require sym)) 147 | 148 | ) 149 | -------------------------------------------------------------------------------- /src/clj-jvm/README.markdown: -------------------------------------------------------------------------------- 1 | # Clojure/Java cheat sheet generator 2 | 3 | The program `src/generator/generator.clj` and accompanying shell script 4 | `./scripts/run.sh` can generate HTML and LaTeX versions of the Clojure/Java 5 | cheat sheet. A suitable LaTeX installation on your computer can then 6 | be used to generate PDF files as well. They are all generated with 7 | structure and symbols specified in the value of `cheatsheet-structure` 8 | in the Clojure source file. They contain clickable links to the 9 | documentation on either [clojure.github.com][clojure github] or 10 | [clojuredocs.org][clojuredocs] (or no links at all). 11 | 12 | [clojure github]: http://clojure.github.com 13 | [clojuredocs]: http://clojuredocs.org 14 | 15 | 16 | # Installation 17 | 18 | ## For Ubuntu 18.04 or 20.04 Linux 19 | 20 | Starting from a minimal Ubuntu 18.04 or 20.04 Linux installation, here 21 | is what you need to install in order to run the cheatsheet generator. 22 | 23 | + Some version of the JDK, e.g. OpenJDK 11 can be installed via the 24 | command: `sudo apt-get install default-jdk` 25 | + Leiningen. The `lein` bash script available from 26 | https://leiningen.org is enough here. 27 | 28 | The above is sufficient if you are not generating the PDF versions of 29 | the cheatsheet. If you want to generate the PDF versions, you also 30 | need to install these LaTeX packages: 31 | 32 | + `sudo apt-get install texlive-latex-base texlive-latex-extra` 33 | 34 | 35 | ## Mac OS X 36 | 37 | As above, you must also install some version of the JDK and Leiningen. 38 | 39 | On a Mac with MacPorts 2.0.3, the following two packages, plus what 40 | they depend upon, are sufficient for generating PDF files: 41 | 42 | * `texlive-latex-recommended` (needed for scrreprt.cls) 43 | * `texlive-fonts-recommended` (needed for the lmodern font) 44 | 45 | This command will install these packages: 46 | 47 | ```bash 48 | sudo port install texlive-latex-recommended texlive-fonts-recommended 49 | ``` 50 | 51 | 52 | # Generating cheat sheet files 53 | 54 | ## Getting an updated copy of the contents of the ClojureDocs web site 55 | 56 | ```bash 57 | curl -O https://clojuredocs.org/clojuredocs-export.json 58 | ``` 59 | 60 | ## Running the cheatsheet generator 61 | 62 | Edit `./scripts/run.sh` to specify the values of `LINK_TARGET` and `PRODUCE_PDF` 63 | variables to your liking. If you want to produce PDF files, you must 64 | have a suitable LaTeX installation on your system (see Installation 65 | above). 66 | 67 | Run this command: 68 | 69 | ```bash 70 | ./scripts/run.sh 71 | ``` 72 | 73 | Output files are: 74 | 75 | * `cheatsheet-no-tooltips-no-cdocs-summary.html` 76 | * `cheatsheet-tiptip-cdocs-summary.html` 77 | * `cheatsheet-tiptip-no-cdocs-summary.html` 78 | * `cheatsheet-use-title-attribute-cdocs-summary.html` 79 | * `cheatsheet-use-title-attribute-no-cdocs-summary.html` 80 | 81 | Five different full versions of the standalone HTML files are 82 | generated, plus one "embeddable" version (see below). The full 83 | versions are standalone HTML files that are useful for viewing 84 | locally with a web browser while testing changes to the program, 85 | or for publishing on the web. Several contain links to files in 86 | the cheatsheet_files subdirectory, and those must also be 87 | published. 88 | 89 | They differ only in whether they have tooltip text on the Clojure 90 | symbols or not, and if so, whether those use HTML-standard title 91 | attribute text or a JavaScript-based method using TipTip and 92 | jQuery. Another variation between tooltip-enhanced versions are 93 | whether the tooltip text includes only the doc string for the 94 | symbol, or in addition a 1- or 2-line summary of how many examples 95 | and comments exist for the symbol on ClojureDocs.org. 96 | 97 | * `cheatsheet-embeddable-for-clojure.org.html` 98 | 99 | The embeddable version is almost the same, except only 100 | includes those things needed for publishing easily at 101 | [http://clojure.org/cheatsheet][cheatsheet]. 102 | 103 | [cheatsheet]: http://clojure.org/cheatsheet 104 | 105 | * `warnings.log` 106 | 107 | Warning messages about any symbols for which no links to 108 | documentation could be found in the internal map called 109 | `symbol-name-to-url`. Also a list of all symbols that are in that 110 | map which are not mentioned in the cheat sheet. These may be 111 | useful to add to future revisions of the cheat sheet, if they are 112 | considered important enough. 113 | 114 | * `cheatsheet-usletter-grey.tex` 115 | * `cheatsheet-usletter-color.tex` 116 | * `cheatsheet-usletter-bw.tex` 117 | * `cheatsheet-a4-grey.tex` 118 | * `cheatsheet-a4-color.tex` 119 | * `cheatsheet-a4-bw.tex` 120 | 121 | LaTeX source files for black & white (bw), grayscale, and color 122 | versions of the cheat sheet, on either A4 or US letter size paper. 123 | The font size has been tuned by hand so that everything fits onto 124 | 2 pages on either size of paper. Search for `fontsize` in the 125 | Clojure source file if future modifications to the cheat sheet 126 | warrant further modification of these. 127 | 128 | If you enable it in `./scripts/run.sh`, corresponding PDF files will also be 129 | generated for each of the LaTeX files. 130 | 131 | 132 | Things still missing: 133 | 134 | * No footer with version number, date, and attributions at the bottom. 135 | 136 | 137 | # License 138 | 139 | Copyright (C) 2012-2020 Andy Fingerhut 140 | 141 | Distributed under the Eclipse Public License, the same as Clojure. 142 | -------------------------------------------------------------------------------- /src/clj-jvm/cheatsheet_files/jquery.tipTip.js: -------------------------------------------------------------------------------- 1 | /* 2 | * TipTip 3 | * Copyright 2010 Drew Wilson 4 | * www.drewwilson.com 5 | * code.drewwilson.com/entry/tiptip-jquery-plugin 6 | * 7 | * Version 1.3 - Updated: Mar. 23, 2010 8 | * 9 | * This Plug-In will create a custom tooltip to replace the default 10 | * browser tooltip. It is extremely lightweight and very smart in 11 | * that it detects the edges of the browser window and will make sure 12 | * the tooltip stays within the current window size. As a result the 13 | * tooltip will adjust itself to be displayed above, below, to the left 14 | * or to the right depending on what is necessary to stay within the 15 | * browser window. It is completely customizable as well via CSS. 16 | * 17 | * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: 18 | * http://www.opensource.org/licenses/mit-license.php 19 | * http://www.gnu.org/licenses/gpl.html 20 | */ 21 | 22 | (function($){ 23 | $.fn.tipTip = function(options) { 24 | var defaults = { 25 | activation: "hover", 26 | keepAlive: false, 27 | maxWidth: "620px", 28 | edgeOffset: 3, 29 | defaultPosition: "bottom", 30 | delay: 200, 31 | fadeIn: 100, 32 | fadeOut: 100, 33 | attribute: "title", 34 | content: false, // HTML or String to fill TipTIp with 35 | enter: function(){}, 36 | exit: function(){} 37 | }; 38 | var opts = $.extend(defaults, options); 39 | 40 | // Setup tip tip elements and render them to the DOM 41 | if($("#tiptip_holder").length <= 0){ 42 | var tiptip_holder = $('
'); 43 | var tiptip_content = $('
'); 44 | var tiptip_arrow = $('
'); 45 | $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('
'))); 46 | } else { 47 | var tiptip_holder = $("#tiptip_holder"); 48 | var tiptip_content = $("#tiptip_content"); 49 | var tiptip_arrow = $("#tiptip_arrow"); 50 | } 51 | 52 | return this.each(function(){ 53 | var org_elem = $(this); 54 | if(opts.content){ 55 | var org_title = opts.content; 56 | } else { 57 | var org_title = org_elem.attr(opts.attribute); 58 | } 59 | if(org_title != ""){ 60 | if(!opts.content){ 61 | org_elem.removeAttr(opts.attribute); //remove original Attribute 62 | } 63 | var timeout = false; 64 | 65 | if(opts.activation == "hover"){ 66 | org_elem.hover(function(){ 67 | active_tiptip(); 68 | }, function(){ 69 | if(!opts.keepAlive){ 70 | deactive_tiptip(); 71 | } 72 | }); 73 | if(opts.keepAlive){ 74 | tiptip_holder.hover(function(){}, function(){ 75 | deactive_tiptip(); 76 | }); 77 | } 78 | } else if(opts.activation == "focus"){ 79 | org_elem.focus(function(){ 80 | active_tiptip(); 81 | }).blur(function(){ 82 | deactive_tiptip(); 83 | }); 84 | } else if(opts.activation == "click"){ 85 | org_elem.click(function(){ 86 | active_tiptip(); 87 | return false; 88 | }).hover(function(){},function(){ 89 | if(!opts.keepAlive){ 90 | deactive_tiptip(); 91 | } 92 | }); 93 | if(opts.keepAlive){ 94 | tiptip_holder.hover(function(){}, function(){ 95 | deactive_tiptip(); 96 | }); 97 | } 98 | } 99 | 100 | function active_tiptip(){ 101 | opts.enter.call(this); 102 | tiptip_content.html(org_title); 103 | tiptip_holder.hide().removeAttr("class").css("margin","0"); 104 | tiptip_arrow.removeAttr("style"); 105 | 106 | var top = parseInt(org_elem.offset()['top']); 107 | var left = parseInt(org_elem.offset()['left']); 108 | var org_width = parseInt(org_elem.outerWidth()); 109 | var org_height = parseInt(org_elem.outerHeight()); 110 | var tip_w = tiptip_holder.outerWidth(); 111 | var tip_h = tiptip_holder.outerHeight(); 112 | var w_compare = Math.round((org_width - tip_w) / 2); 113 | var t_class = ""; 114 | 115 | var tip_height_with_margin = (tip_h + 15); 116 | var tip_top_if_below = Math.round(top + org_height + opts.edgeOffset); 117 | var tip_top_if_above = Math.round(top - (opts.edgeOffset + tip_height_with_margin)); 118 | var window_top = parseInt($(window).scrollTop()); 119 | var window_bottom = window_top + parseInt($(window).height()); 120 | 121 | if ((tip_top_if_below + tip_height_with_margin) <= window_bottom){ 122 | t_class = "_bottom"; 123 | marg_top = tip_top_if_below; 124 | arrow_top = -12; 125 | } else if (tip_top_if_above >= window_top){ 126 | t_class = "_top"; 127 | marg_top = tip_top_if_above; 128 | arrow_top = tip_h; 129 | } else { 130 | t_class = "_bottom"; 131 | marg_top = tip_top_if_below; 132 | arrow_top = -12; 133 | } 134 | 135 | var window_left = parseInt($(window).scrollLeft()); 136 | var window_right = window_left + parseInt($(window).width()); 137 | var marg_left = Math.round(left + w_compare); 138 | if (marg_left < window_left + 10){ 139 | marg_left = window_left + 10; 140 | } else if ((marg_left + tip_w) > window_right - 10){ 141 | marg_left = window_right - 10 - tip_w; 142 | } 143 | var arrow_left = Math.round(left + (org_width / 2) - marg_left); 144 | 145 | tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"}); 146 | tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class); 147 | 148 | if (timeout){ clearTimeout(timeout); } 149 | timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay); 150 | } 151 | 152 | function deactive_tiptip(){ 153 | opts.exit.call(this); 154 | if (timeout){ clearTimeout(timeout); } 155 | tiptip_holder.fadeOut(opts.fadeOut); 156 | } 157 | } 158 | }); 159 | } 160 | })(jQuery); 161 | -------------------------------------------------------------------------------- /src/clj-jvm/cheatsheet_files/style.css: -------------------------------------------------------------------------------- 1 | body {margin: 0;padding:0;} 2 | 3 | .wiki ol.includeWikiList { list-style: none; margin-left: 6px; padding: 0; text-indent: -6px; } 4 | /* Wiki Rendered Styles */ 5 | .wiki { line-height: 150%; font-family: arial, helvetica, sans-serif; font-size: small; } 6 | .wiki h1 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.4em; } 7 | .wiki h2 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.3em; } 8 | .wiki h3 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.1em; } 9 | .wiki h4 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.066em; } 10 | .wiki h5 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.033em; } 11 | .wiki h6 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.0em; } 12 | .wiki table { border-collapse: collapse; margin: 10px 0; font-size: 1em; } 13 | .wiki p { margin: 0; padding: 0; padding: 5px 0; } 14 | .wiki td { border: 1px solid #DDD; } 15 | .wiki #toc { border: 1px solid #AAA; background: #fff; padding: 5px; margin: 0 0 10px 10px; width: 25%; float: right; clear: right;} 16 | .wiki #toc h1 { font-weight: normal; font-size: 1.2em; padding: 0; } 17 | .wiki #toc a:hover { color: #00D; background: #FFD; } 18 | .wiki pre { background-color: #EEE; border: 1px solid #CCC; padding: 10px; font-size: small;} 19 | .wiki .nob td { border: 0; } 20 | .wiki hr { height: 1px; color: #AAA; background-color: #AAA; border: 0; margin: 0 10px; } 21 | .wiki ul { padding: .5em 0 0 3em; margin: 0; } 22 | .wiki ol { padding: .5em 0 0 3em; margin: 0; } 23 | .wiki ul.quotelist { list-style: none; } 24 | .wiki a.ext { background: url(/i/a.gif) center right no-repeat; padding-right: 10px; } 25 | .wiki a.wiki_link_new { color: #600; } 26 | .wiki a.wiki_link_ext { background: url(/i/a.gif) center right no-repeat; padding-right: 10px; } 27 | .wiki tt { font-size: small; } 28 | .wiki img { border: 0; padding: 4px; } 29 | 30 | .wiki .includeBodyActive { border-right: 1px #888888 solid; border-bottom: 1px #888888 solid; border-left: 1px #CCCCCC solid; border-top: 1px #CCCCCC solid; background: #fffacd; clear: left; } 31 | .wiki .includeBody { background: inherit; border: 1px transparent solid; clear: left; } 32 | .wiki .includeHeader { padding: 2px; padding-top: 2px; } 33 | .wiki .includeTitle { font-size: 120%; font-weight: bold; } 34 | .wiki .includeEditButton { float: right; padding-left: 10px; padding-right: 10px;} 35 | .wiki .includeEditButtonActive { float: right; padding-left: 10px; padding-right: 10px; } 36 | .wiki .includeEditButton a { color: #888888; font-size: 80%; text-decoration: none; } 37 | .wiki .includeEditButtonActive a { color: black; font-size: 80%; text-decoration: none; } 38 | 39 | .wiki .captionBox { border: thin gray solid; padding: 5px; margin: 2px; } 40 | .wiki .imageCaption { text-align: center; } 41 | 42 | .wiki .RssAuthor { color: #666; font-size: 80%; } 43 | .wiki .RssDate { color: #666; font-size: 80%; } 44 | 45 | .wiki .userLink { font-weight: bold; } 46 | .wiki .userLinkGuest { font-weight: bold; } 47 | 48 | /* Comments Include styles */ 49 | .wiki table.includeComments { border-collapse: collapse; padding: 0; margin: 0; width: 100%; } 50 | .wiki table.includeComments td, .wiki table.includeComments th { border: 1px solid #DDD; padding: 4px; margin: 0; } 51 | .wiki table.includeComments th { color: #333; padding: 4px; margin: 0; text-align: center; white-space: nowrap; } 52 | .wiki table.includeComments thead th { background:url(/i/gradient_grey.gif) top left repeat-x #FFF; } 53 | .wiki table.includeComments tfoot th { background-color: #EEE; } 54 | 55 | /* History Include styles */ 56 | .wiki table.includeHistory { border-collapse: collapse; padding: 0; margin: 0; width: 100%; } 57 | .wiki table.includeHistory td, .wiki table.includeHistory th { border: 1px solid #DDD; padding: 4px; margin: 0; } 58 | .wiki table.includeHistory th { color: #333; padding: 4px; margin: 0; text-align: center; white-space: nowrap; } 59 | .wiki table.includeHistory thead th { background:url(/i/gradient_grey.gif) top left repeat-x #FFF; } 60 | .wiki table.includeHistory tfoot th { background-color: #EEE; } 61 | 62 | /* Backlinks Include styles */ 63 | .wiki table.includeBacklinks { border-collapse: collapse; padding: 0; margin: 0; width: 100%; } 64 | .wiki table.includeBacklinks td, .wiki table.includeBacklinks th { border: 1px solid #DDD; padding: 4px; margin: 0; } 65 | .wiki table.includeBacklinks th { color: #333; padding: 4px; margin: 0; text-align: center; white-space: nowrap; } 66 | .wiki table.includeBacklinks thead th { background:url(/i/gradient_grey.gif) top left repeat-x #FFF; } 67 | .wiki table.includeBacklinks tfoot th { background-color: #EEE; } 68 | 69 | /* Editors Include Styles */ 70 | .wiki ul.includeEditorsLarge { list-style: none; display: inline; padding: 0; } 71 | .wiki ul.includeEditorsSmall { list-style: none; display: inline; padding: 0; } 72 | .wiki ul.includeEditorsLarge li { display: inline; padding: 2px; } 73 | .wiki ul.includeEditorsSmall li { display: block; padding: 2px; } 74 | 75 | /* Page List Include Styles */ 76 | .wiki ol.includePageList { list-style: none; padding: 0; } 77 | 78 | /* Tag Cloud Include Styles */ 79 | .wiki ol.includeTagCloud { list-style: none; display: inline; padding: 0; } 80 | .wiki ol.includeTagCloud li { display: inline; padding: 2px;} 81 | 82 | /* Adjust custom nav list padding */ 83 | .WikiCustomNav ol, .WikiCustomNav ul { padding-left: 0; } 84 | 85 | 86 | /* Search styles */ 87 | 88 | .search { 89 | padding: 0.3em 0.3em 0; 90 | } 91 | 92 | #search { 93 | margin: 0; 94 | display: block; 95 | border-radius: 5px; 96 | border: 1px solid #ddd; 97 | background: #ebebeb; 98 | padding: 5px; 99 | font-size: 1.5em; 100 | font-weight: bold; 101 | outline: none; 102 | box-sizing: border-box; 103 | width: 100%; 104 | } 105 | 106 | #search:focus { 107 | border: 1px solid #999; 108 | } 109 | 110 | #search.highlight { 111 | background: red; 112 | } 113 | 114 | .highlight { 115 | background: yellow; 116 | } 117 | 118 | /* Responsive styles */ 119 | 120 | .page { 121 | float: left; 122 | } 123 | 124 | .column { 125 | min-width: 30em; 126 | } 127 | 128 | @media only screen and (min-width: 801px) { 129 | .page { 130 | max-width: 73em; 131 | } 132 | 133 | .search { 134 | max-width: 29em; 135 | } 136 | } 137 | 138 | 139 | @media only screen and (max-width: 800px) { 140 | .wiki { 141 | font-size: 10px; 142 | } 143 | } 144 | 145 | @media only screen and (max-width: 620px) { 146 | .page .column { 147 | width: 100%; 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /src/cljs-cheatsheet.tex: -------------------------------------------------------------------------------- 1 | \documentclass[footexclude,twocolumn,DIV25,fontsize=10pt]{scrreprt} 2 | 3 | % Author: Fogus (based on Steve Tayon's Clojure and David Liebke's Incanter cheat sheets) 4 | % Comments, errors, suggestions: fogus -at- clojure -dot- com 5 | 6 | % License 7 | % Eclipse Public License v1.0 8 | % http://opensource.org/licenses/eclipse-1.0.php 9 | 10 | % Packages 11 | \usepackage[utf8]{inputenc} 12 | \usepackage[T1]{fontenc} 13 | \usepackage{textcomp} 14 | \usepackage[english]{babel} 15 | \usepackage{tabularx} 16 | \usepackage{verbatim} 17 | \usepackage[table]{xcolor} 18 | 19 | % Set column space 20 | \setlength{\columnsep}{0.25em} 21 | 22 | % Define colours 23 | \definecolorset{hsb}{}{}{red,0,.4,0.95;orange,.1,.4,0.95;green,.25,.4,0.95;yellow,.15,.4,0.95} 24 | \definecolorset{hsb}{}{}{blue,.55,.4,0.95;purple,.7,.4,0.95;pink,.8,.4,0.95;blue2,.58,.4,0.95} 25 | \definecolorset{hsb}{}{}{magenta,.9,.4,0.95;green2,.29,.4,0.95} 26 | 27 | \definecolor{Brown}{cmyk}{0,0.81,1,0.60} 28 | \definecolor{OliveGreen}{cmyk}{0.64,0,0.95,0.40} 29 | \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0} 30 | \definecolor{lightlightgray}{gray}{0.9} 31 | 32 | % Redefine sections 33 | \makeatletter 34 | \renewcommand{\section}{\@startsection{section}{1}{0mm} 35 | {-1.7ex}{0.7ex}{\normalfont\large\bfseries}} 36 | \renewcommand{\subsection}{\@startsection{subsection}{2}{0mm} 37 | {-1.7ex}{0.5ex}{\normalfont\normalsize\bfseries}} 38 | \makeatother 39 | 40 | % No section numbers 41 | \setcounter{secnumdepth}{0} 42 | 43 | % No indentation 44 | \setlength{\parindent}{0em} 45 | 46 | % No header and footer 47 | \pagestyle{empty} 48 | 49 | 50 | % A few shortcuts 51 | \newcommand{\cmd}[1] {\texttt{\textbf{{#1}}}} 52 | \newcommand{\cmdline}[1] { 53 | \begin{tabularx}{\hsize}{X} 54 | \texttt{\textbf{{#1}}} 55 | \end{tabularx} 56 | } 57 | 58 | \newcommand{\colouredbox}[2] { 59 | \colorbox{#1!40}{ 60 | \begin{minipage}{0.95\linewidth} 61 | { 62 | \rowcolors[]{1}{#1!20}{#1!10} 63 | #2 64 | } 65 | \end{minipage} 66 | } 67 | } 68 | 69 | \usepackage{color} 70 | \usepackage{xcolor} 71 | \usepackage{listings} 72 | \usepackage[small,bf]{caption} 73 | 74 | \DeclareCaptionFont{white}{\color{white}} 75 | \DeclareCaptionFormat{listing}{\colorbox{yellow}{\parbox{0.95\linewidth}{\hspace{15pt}#1#2#3}}} 76 | \captionsetup[lstlisting]{format=listing} 77 | 78 | \begin{document} 79 | 80 | \centerline{\Large{\textbf{ClojureScript Cheat Sheet}}} 81 | \centerline{{\large{\textbf{\textit{http://github.com/clojure/clojurescript}}}}} 82 | 83 | \colouredbox{green}{ 84 | \section{Documentation} 85 | \textmd{\textrm{http://github.com/clojure/clojurescript/wiki}} 86 | } 87 | 88 | \lstset{ 89 | language=Lisp, % Code langugage 90 | basicstyle=\ttfamily, 91 | keywordstyle=\color{OliveGreen}, 92 | morekeywords={require, use, ns, require-macros, use-macros, as, only}, 93 | frame=none, 94 | } 95 | 96 | \begin{lstlisting}[label=ns,caption=Example Namespace Declaration] 97 | (ns my-cool-lib 98 | (:require [some-lib :as lib]) 99 | (:use [another-lib :only (a-func)]) 100 | (:require-macros [my.macros :as macs]) 101 | (:use-macros [mo.macs :only (my-mac)])) 102 | \end{lstlisting} 103 | 104 | 105 | \colouredbox{red}{ 106 | \section{Rich Data Literals} 107 | \begin{tabularx}{\hsize}{lX} 108 | Maps: & \cmd{\{:key1 :val1, :key2 :val2\}} \\ 109 | Vectors: & \cmd{[1 2 3 4 :a :b :c 1 2]} \\ 110 | Sets: & \cmd{\#\{:a :b :c 1 2 3\}} \\ 111 | Truth and nullity: & \cmd{true, false, nil} \\ 112 | Keywords: & \cmd{:kw, :a-2, :prefix/kw, ::pi} \\ 113 | Symbols: & \cmd{sym, sym-2, prefix/sym} \\ 114 | Characters: & \cmd{\textbackslash a, \textbackslash u1123, \textbackslash space} \\ 115 | Numbers/Strings: & same as in JavaScript \\ 116 | \end{tabularx} 117 | 118 | } 119 | 120 | 121 | \colouredbox{blue}{ 122 | \section{Frequently Used Functions} 123 | \begin{tabularx}{\hsize}{lX} 124 | Math:& \cmd{+ - * / quot rem mod inc dec max min}\\ 125 | Comparison:& \cmd{= == not= < > <= >=}\\ 126 | Tests:& \cmd{nil? identical? zero? pos? neg? even? odd? true? false? nil?} \\ 127 | Keywords:& \cmd{keyword keyword?} \\ 128 | Symbols:& \cmd{symbol symbol? gensym} \\ 129 | Data Processing:& \cmd{map reduce filter partition split-at split-with} \\ 130 | Data Create:& \cmd{vector vec hash-map set list list* for} \\ 131 | Data Examination:& \cmd{first rest count get nth get get-in contains? find keys vals} \\ 132 | Data Manipulation:& \cmd{seq into conj cons assoc assoc-in dissoc zipmap merge merge-with select-keys update-in}\\ 133 | Arrays:& \cmd{into-array to-array aget aset amap areduce alength}\\ 134 | \end{tabularx} 135 | 136 | \subsection{More information} 137 | \begin{tabularx}{\hsize}{lX} 138 | \centerline{{\large{\textbf{\textit{http://clojuredocs.org}}}}} 139 | \end{tabularx} 140 | 141 | } 142 | 143 | 144 | \colouredbox{pink}{ 145 | \section{Frequently Used Macros} 146 | \begin{tabularx}{\hsize}{lX} 147 | Defining:& \cmd{defmacro}\\ 148 | Macros:& \cmd{if if-let cond and or -> ->> doto when when-let ..}\\ 149 | Implementation:& Must be written in Clojure \\ 150 | Emission:& Must emit ClojureScript \\ 151 | \end{tabularx} 152 | 153 | } 154 | 155 | 156 | \colouredbox{orange}{ 157 | \section{Abstraction (http://clojure.org/protocols)} 158 | 159 | \subsection{Protocols} 160 | \begin{tabularx}{\hsize}{lX} 161 | Definition:& \cmd{(defprotocol Slicey (slice [at]))} \\ 162 | Extend:& \cmd{(extend-type js/String Slicey (slice [at] ...))} \\ 163 | Extend null:& \cmd{(extend-type nil Slicey (slice [\_] nil))} \\ 164 | Reify:& \cmd{(reify Slicey (slice [at] ...))}\\ 165 | \end{tabularx} 166 | 167 | \subsection{Records} 168 | \begin{tabularx}{\hsize}{lX} 169 | Definition:& \cmd{(defrecord Pair [h t])} \\ 170 | Access:& \cmd{(:h (Pair. 1 2)) ;=> 1} \\ 171 | Constructing:& \cmd{Pair. ->Pair map->Pair} \\ 172 | \end{tabularx} 173 | 174 | \subsection{Types} 175 | \begin{tabularx}{\hsize}{lX} 176 | Definition:& \cmd{(deftype Pair [h t])} \\ 177 | Access:& \cmd{(.-h (Pair. 1 2)) ;=> 1} \\ 178 | Constructing:& \cmd{Pair. ->Pair} \\ 179 | With Method(s):& \cmd{(deftype Pair [h t] Object (toString [] ...))} \\ 180 | \end{tabularx} 181 | 182 | \subsection{Multimethods} 183 | \begin{tabularx}{\hsize}{lX} 184 | Definition:& \cmd{(defmulti my-mm dispatch-function)}\\ 185 | Method Define:& \cmd{(defmethod my-mm :dispatch-value [args] ...)}\\ 186 | \end{tabularx} 187 | 188 | } 189 | 190 | \colouredbox{yellow}{ 191 | \section{JS Interop (http://fogus.me/cljs-js)} 192 | \begin{tabularx}{\hsize}{lX} 193 | Method Call: & \cmd{(.meth obj args)} \\ 194 | Method Call: & \cmd{(. obj (meth args))} \\ 195 | Property Access: & \cmd{(. obj -prop)} \\ 196 | Property Access: & \cmd{(.-prop obj)} \\ 197 | Set Property: & \cmd{(set! (.-prop obj) val)} \\ 198 | JS Global Access: & \cmd{js/window} \\ 199 | JS \cmd{this}: & \cmd{(this-as me (.method me))} \\ 200 | Create JS Object: & \cmd{(js-obj)} \\ 201 | \end{tabularx} 202 | 203 | } 204 | 205 | 206 | \colouredbox{blue2}{ 207 | \section{Compilation (http://fogus.me/cljsc)} 208 | \begin{tabularx}{\hsize}{lX} 209 | Simple Compile: & \cmdline{cljsc src-home '\{:optimizations :simple :pretty-print true\}'} \\ 210 | Advanced Compile: & \cmdline{cljsc src-home '\{:optimizations :advanced\}'} \\ 211 | \end{tabularx} 212 | 213 | } 214 | 215 | 216 | \colouredbox{pink}{ 217 | \section{Extra ClojureScript Libraries} 218 | \cmd{clojure.\{string set zipper\} clojure.browser.\{dom event net repl\}}\\ 219 | 220 | } 221 | 222 | 223 | \colouredbox{green}{ 224 | \section{Other Useful Libraries} 225 | \begin{tabularx}{\hsize}{lX} 226 | App Sample: & http://clojurescriptone.com \\ 227 | Client/Server: & http://github.com/ibdknox/fetch \\ 228 | Data Viz: & http://github.com/lynaghk/cljs-d3 \\ 229 | DOM: & http://github.com/levand/domina \\ 230 | jQuery: & http://github.com/ibdknox/jayq \\ 231 | Templating: & http://github.com/ibdknox/crate \\ 232 | \end{tabularx} 233 | 234 | } 235 | 236 | 237 | \begin{flushright} 238 | \footnotesize 239 | \rule{0.7\linewidth}{0.25pt} 240 | \verb!$Revision: 1.0, $Date: Feb 08, 2012!\\ 241 | \verb!Fogus (fogus -at- clojure -dot- com)! 242 | \end{flushright} 243 | \end{document} 244 | -------------------------------------------------------------------------------- /src/clj-jvm/unused-symbols.txt: -------------------------------------------------------------------------------- 1 | Partial contents of warnings.log file from a run of run.sh done on 2 | 2020-Jul-12: 3 | 4 | Sorted list of 415 symbols in lookup table that were never used: 5 | 6 | *allow-unresolved-vars* 7 | *assert* 8 | *compiler-options* 9 | *flush-on-newline* 10 | *fn-loader* 11 | *math-context* 12 | *print-namespace-maps* 13 | *read-eval* 14 | *reader-resolver* 15 | *source-path* 16 | *suppress-read* 17 | *use-context-classloader* 18 | *verbose-defrecords* 19 | ->ArrayChunk 20 | ->Eduction 21 | ->Vec 22 | ->VecNode 23 | ->VecSeq 24 | -cache-protocol-fn 25 | -reset-methods 26 | EMPTY-NODE 27 | Inst 28 | PrintWriter-on 29 | accessor 30 | add-classpath 31 | agent-errors 32 | await1 33 | chunk 34 | chunk-append 35 | chunk-buffer 36 | chunk-cons 37 | chunk-first 38 | chunk-next 39 | chunk-rest 40 | chunked-seq? 41 | clear-agent-errors 42 | clojure.core.protocols/CollReduce 43 | clojure.core.protocols/Datafiable 44 | clojure.core.protocols/IKVReduce 45 | clojure.core.protocols/InternalReduce 46 | clojure.core.protocols/Navigable 47 | clojure.core.protocols/coll-reduce 48 | clojure.core.protocols/datafy 49 | clojure.core.protocols/internal-reduce 50 | clojure.core.protocols/kv-reduce 51 | clojure.core.protocols/nav 52 | clojure.core.reducers/->Cat 53 | clojure.core.reducers/CollFold 54 | clojure.core.reducers/append! 55 | clojure.core.reducers/cat 56 | clojure.core.reducers/coll-fold 57 | clojure.core.reducers/drop 58 | clojure.core.reducers/filter 59 | clojure.core.reducers/fjtask 60 | clojure.core.reducers/flatten 61 | clojure.core.reducers/fold 62 | clojure.core.reducers/foldcat 63 | clojure.core.reducers/folder 64 | clojure.core.reducers/map 65 | clojure.core.reducers/mapcat 66 | clojure.core.reducers/monoid 67 | clojure.core.reducers/pool 68 | clojure.core.reducers/reduce 69 | clojure.core.reducers/reducer 70 | clojure.core.reducers/remove 71 | clojure.core.reducers/take 72 | clojure.core.reducers/take-while 73 | clojure.core.server/*session* 74 | clojure.core.server/io-prepl 75 | clojure.core.server/prepl 76 | clojure.core.server/remote-prepl 77 | clojure.core.server/repl 78 | clojure.core.server/repl-init 79 | clojure.core.server/repl-read 80 | clojure.core.server/start-server 81 | clojure.core.server/start-servers 82 | clojure.core.server/stop-server 83 | clojure.core.server/stop-servers 84 | clojure.core.specs.alpha/even-number-of-forms? 85 | clojure.data/Diff 86 | clojure.data/EqualityPartition 87 | clojure.data/diff-similar 88 | clojure.data/equality-partition 89 | clojure.inspector/atom? 90 | clojure.inspector/collection-tag 91 | clojure.inspector/get-child 92 | clojure.inspector/get-child-count 93 | clojure.inspector/inspect 94 | clojure.inspector/inspect-table 95 | clojure.inspector/inspect-tree 96 | clojure.inspector/is-leaf 97 | clojure.inspector/list-model 98 | clojure.inspector/list-provider 99 | clojure.inspector/old-table-model 100 | clojure.inspector/table-model 101 | clojure.inspector/tree-model 102 | clojure.instant/parse-timestamp 103 | clojure.instant/read-instant-calendar 104 | clojure.instant/read-instant-date 105 | clojure.instant/read-instant-timestamp 106 | clojure.instant/validated 107 | clojure.java.browse/*open-url-script* 108 | clojure.java.io/Coercions 109 | clojure.java.io/IOFactory 110 | clojure.java.io/default-streams-impl 111 | clojure.java.io/make-input-stream 112 | clojure.java.io/make-output-stream 113 | clojure.java.io/make-parents 114 | clojure.java.io/make-reader 115 | clojure.java.io/make-writer 116 | clojure.java.javadoc/*core-java-api* 117 | clojure.java.javadoc/*feeling-lucky* 118 | clojure.java.javadoc/*feeling-lucky-url* 119 | clojure.java.javadoc/*local-javadocs* 120 | clojure.java.javadoc/*remote-javadocs* 121 | clojure.java.javadoc/add-local-javadoc 122 | clojure.java.javadoc/add-remote-javadoc 123 | clojure.java.shell/*sh-dir* 124 | clojure.java.shell/*sh-env* 125 | clojure.main/demunge 126 | clojure.main/load-script 127 | clojure.main/main 128 | clojure.main/renumbering-read 129 | clojure.main/repl 130 | clojure.main/repl-caught 131 | clojure.main/repl-exception 132 | clojure.main/repl-prompt 133 | clojure.main/repl-read 134 | clojure.main/repl-requires 135 | clojure.main/root-cause 136 | clojure.main/skip-if-eol 137 | clojure.main/skip-whitespace 138 | clojure.main/stack-element-str 139 | clojure.main/with-bindings 140 | clojure.main/with-read-known 141 | clojure.pprint/*print-base* 142 | clojure.pprint/*print-miser-width* 143 | clojure.pprint/*print-pprint-dispatch* 144 | clojure.pprint/*print-pretty* 145 | clojure.pprint/*print-radix* 146 | clojure.pprint/*print-right-margin* 147 | clojure.pprint/*print-suppress-namespaces* 148 | clojure.pprint/code-dispatch 149 | clojure.pprint/formatter 150 | clojure.pprint/formatter-out 151 | clojure.pprint/fresh-line 152 | clojure.pprint/get-pretty-writer 153 | clojure.pprint/pp 154 | clojure.pprint/pprint-indent 155 | clojure.pprint/pprint-logical-block 156 | clojure.pprint/pprint-newline 157 | clojure.pprint/pprint-tab 158 | clojure.pprint/print-length-loop 159 | clojure.pprint/set-pprint-dispatch 160 | clojure.pprint/simple-dispatch 161 | clojure.pprint/with-pprint-dispatch 162 | clojure.pprint/write 163 | clojure.pprint/write-out 164 | clojure.reflect/->AsmReflector 165 | clojure.reflect/->Constructor 166 | clojure.reflect/->Field 167 | clojure.reflect/->JavaReflector 168 | clojure.reflect/->Method 169 | clojure.reflect/ClassResolver 170 | clojure.reflect/Reflector 171 | clojure.reflect/TypeReference 172 | clojure.reflect/do-reflect 173 | clojure.reflect/flag-descriptors 174 | clojure.reflect/map->Constructor 175 | clojure.reflect/map->Field 176 | clojure.reflect/map->Method 177 | clojure.reflect/reflect 178 | clojure.reflect/resolve-class 179 | clojure.reflect/type-reflect 180 | clojure.reflect/typename 181 | clojure.repl/demunge 182 | clojure.repl/dir-fn 183 | clojure.repl/root-cause 184 | clojure.repl/set-break-handler! 185 | clojure.repl/source-fn 186 | clojure.repl/stack-element-str 187 | clojure.repl/thread-stopper 188 | clojure.spec.alpha/*coll-check-limit* 189 | clojure.spec.alpha/*coll-error-limit* 190 | clojure.spec.alpha/*compile-asserts* 191 | clojure.spec.alpha/*fspec-iterations* 192 | clojure.spec.alpha/*recursion-limit* 193 | clojure.spec.alpha/Spec 194 | clojure.spec.alpha/Specize 195 | clojure.spec.alpha/abbrev 196 | clojure.spec.alpha/alt-impl 197 | clojure.spec.alpha/amp-impl 198 | clojure.spec.alpha/and-spec-impl 199 | clojure.spec.alpha/assert* 200 | clojure.spec.alpha/cat-impl 201 | clojure.spec.alpha/conform* 202 | clojure.spec.alpha/def-impl 203 | clojure.spec.alpha/describe* 204 | clojure.spec.alpha/every-impl 205 | clojure.spec.alpha/explain* 206 | clojure.spec.alpha/explain-data* 207 | clojure.spec.alpha/fspec-impl 208 | clojure.spec.alpha/gen* 209 | clojure.spec.alpha/invalid? 210 | clojure.spec.alpha/map-spec-impl 211 | clojure.spec.alpha/maybe-impl 212 | clojure.spec.alpha/merge-spec-impl 213 | clojure.spec.alpha/multi-spec-impl 214 | clojure.spec.alpha/nilable-impl 215 | clojure.spec.alpha/nonconforming 216 | clojure.spec.alpha/or-spec-impl 217 | clojure.spec.alpha/regex-spec-impl 218 | clojure.spec.alpha/regex? 219 | clojure.spec.alpha/rep+impl 220 | clojure.spec.alpha/rep-impl 221 | clojure.spec.alpha/spec-impl 222 | clojure.spec.alpha/specize* 223 | clojure.spec.alpha/tuple 224 | clojure.spec.alpha/tuple-impl 225 | clojure.spec.alpha/unform* 226 | clojure.spec.alpha/with-gen* 227 | clojure.spec.gen.alpha/any 228 | clojure.spec.gen.alpha/any-printable 229 | clojure.spec.gen.alpha/bind 230 | clojure.spec.gen.alpha/boolean 231 | clojure.spec.gen.alpha/bytes 232 | clojure.spec.gen.alpha/cat 233 | clojure.spec.gen.alpha/char 234 | clojure.spec.gen.alpha/char-alpha 235 | clojure.spec.gen.alpha/char-alphanumeric 236 | clojure.spec.gen.alpha/char-ascii 237 | clojure.spec.gen.alpha/choose 238 | clojure.spec.gen.alpha/delay 239 | clojure.spec.gen.alpha/delay-impl 240 | clojure.spec.gen.alpha/double 241 | clojure.spec.gen.alpha/double* 242 | clojure.spec.gen.alpha/elements 243 | clojure.spec.gen.alpha/fmap 244 | clojure.spec.gen.alpha/for-all* 245 | clojure.spec.gen.alpha/frequency 246 | clojure.spec.gen.alpha/gen-for-name 247 | clojure.spec.gen.alpha/gen-for-pred 248 | clojure.spec.gen.alpha/generate 249 | clojure.spec.gen.alpha/hash-map 250 | clojure.spec.gen.alpha/int 251 | clojure.spec.gen.alpha/keyword 252 | clojure.spec.gen.alpha/keyword-ns 253 | clojure.spec.gen.alpha/large-integer 254 | clojure.spec.gen.alpha/large-integer* 255 | clojure.spec.gen.alpha/lazy-combinator 256 | clojure.spec.gen.alpha/lazy-combinators 257 | clojure.spec.gen.alpha/lazy-prim 258 | clojure.spec.gen.alpha/lazy-prims 259 | clojure.spec.gen.alpha/list 260 | clojure.spec.gen.alpha/map 261 | clojure.spec.gen.alpha/not-empty 262 | clojure.spec.gen.alpha/one-of 263 | clojure.spec.gen.alpha/quick-check 264 | clojure.spec.gen.alpha/ratio 265 | clojure.spec.gen.alpha/return 266 | clojure.spec.gen.alpha/sample 267 | clojure.spec.gen.alpha/set 268 | clojure.spec.gen.alpha/shuffle 269 | clojure.spec.gen.alpha/simple-type 270 | clojure.spec.gen.alpha/simple-type-printable 271 | clojure.spec.gen.alpha/string 272 | clojure.spec.gen.alpha/string-alphanumeric 273 | clojure.spec.gen.alpha/string-ascii 274 | clojure.spec.gen.alpha/such-that 275 | clojure.spec.gen.alpha/symbol 276 | clojure.spec.gen.alpha/symbol-ns 277 | clojure.spec.gen.alpha/tuple 278 | clojure.spec.gen.alpha/uuid 279 | clojure.spec.gen.alpha/vector 280 | clojure.spec.gen.alpha/vector-distinct 281 | clojure.stacktrace/e 282 | clojure.stacktrace/print-cause-trace 283 | clojure.stacktrace/print-stack-trace 284 | clojure.stacktrace/print-throwable 285 | clojure.stacktrace/print-trace-element 286 | clojure.stacktrace/root-cause 287 | clojure.template/apply-template 288 | clojure.template/do-template 289 | clojure.test.junit/*depth* 290 | clojure.test.junit/*var-context* 291 | clojure.test.junit/element-content 292 | clojure.test.junit/error-el 293 | clojure.test.junit/failure-el 294 | clojure.test.junit/finish-case 295 | clojure.test.junit/finish-element 296 | clojure.test.junit/finish-suite 297 | clojure.test.junit/indent 298 | clojure.test.junit/junit-report 299 | clojure.test.junit/message-el 300 | clojure.test.junit/package-class 301 | clojure.test.junit/start-case 302 | clojure.test.junit/start-element 303 | clojure.test.junit/start-suite 304 | clojure.test.junit/suite-attrs 305 | clojure.test.junit/test-name 306 | clojure.test.junit/with-junit-output 307 | clojure.test.tap/print-diagnostics 308 | clojure.test.tap/print-tap-diagnostic 309 | clojure.test.tap/print-tap-fail 310 | clojure.test.tap/print-tap-pass 311 | clojure.test.tap/print-tap-plan 312 | clojure.test.tap/tap-report 313 | clojure.test.tap/with-tap-output 314 | clojure.test/*initial-report-counters* 315 | clojure.test/*load-tests* 316 | clojure.test/*report-counters* 317 | clojure.test/*stack-trace-depth* 318 | clojure.test/*test-out* 319 | clojure.test/*testing-contexts* 320 | clojure.test/*testing-vars* 321 | clojure.test/are 322 | clojure.test/assert-any 323 | clojure.test/assert-expr 324 | clojure.test/assert-predicate 325 | clojure.test/compose-fixtures 326 | clojure.test/deftest 327 | clojure.test/deftest- 328 | clojure.test/do-report 329 | clojure.test/file-position 330 | clojure.test/function? 331 | clojure.test/get-possibly-unbound-var 332 | clojure.test/inc-report-counter 333 | clojure.test/is 334 | clojure.test/join-fixtures 335 | clojure.test/report 336 | clojure.test/run-all-tests 337 | clojure.test/run-tests 338 | clojure.test/set-test 339 | clojure.test/successful? 340 | clojure.test/test-all-vars 341 | clojure.test/test-ns 342 | clojure.test/test-var 343 | clojure.test/test-vars 344 | clojure.test/testing 345 | clojure.test/testing-contexts-str 346 | clojure.test/testing-vars-str 347 | clojure.test/try-expr 348 | clojure.test/use-fixtures 349 | clojure.test/with-test 350 | clojure.test/with-test-out 351 | clojure.walk/keywordize-keys 352 | clojure.walk/stringify-keys 353 | clojure.xml/*current* 354 | clojure.xml/*sb* 355 | clojure.xml/*stack* 356 | clojure.xml/*state* 357 | clojure.xml/attrs 358 | clojure.xml/content 359 | clojure.xml/content-handler 360 | clojure.xml/element 361 | clojure.xml/emit 362 | clojure.xml/emit-element 363 | clojure.xml/startparse-sax 364 | clojure.xml/tag 365 | create-struct 366 | defstruct 367 | delay? 368 | denominator 369 | destructure 370 | find-protocol-impl 371 | find-protocol-method 372 | hash-combine 373 | hash-ordered-coll 374 | hash-unordered-coll 375 | inst-ms 376 | inst-ms* 377 | method-sig 378 | mix-collection-hash 379 | munge 380 | namespace-munge 381 | numerator 382 | primitives-classnames 383 | print-ctor 384 | print-dup 385 | print-method 386 | print-simple 387 | proxy-call-with-super 388 | proxy-name 389 | read 390 | read+string 391 | read-string 392 | reader-conditional 393 | reader-conditional? 394 | refer-clojure 395 | replicate 396 | special-symbol? 397 | struct 398 | struct-map 399 | tagged-literal 400 | tagged-literal? 401 | unchecked-add-int 402 | unchecked-byte 403 | unchecked-char 404 | unchecked-dec-int 405 | unchecked-divide-int 406 | unchecked-double 407 | unchecked-float 408 | unchecked-inc-int 409 | unchecked-int 410 | unchecked-long 411 | unchecked-multiply-int 412 | unchecked-negate-int 413 | unchecked-remainder-int 414 | unchecked-short 415 | unchecked-subtract-int 416 | unquote 417 | unquote-splicing 418 | with-bindings 419 | with-bindings* 420 | with-loading-context 421 | 422 | 423 | Sorted list of 114 namespace names currently existing: 424 | 425 | cemerick.url 426 | clojure.core 427 | clojure.core.async 428 | clojure.core.async.impl.buffers 429 | clojure.core.async.impl.channels 430 | clojure.core.async.impl.concurrent 431 | clojure.core.async.impl.dispatch 432 | clojure.core.async.impl.exec.threadpool 433 | clojure.core.async.impl.ioc-macros 434 | clojure.core.async.impl.mutex 435 | clojure.core.async.impl.protocols 436 | clojure.core.async.impl.timers 437 | clojure.core.cache 438 | clojure.core.memoize 439 | clojure.core.protocols 440 | clojure.core.reducers 441 | clojure.core.rrb-vector 442 | clojure.core.rrb-vector.fork-join 443 | clojure.core.rrb-vector.interop 444 | clojure.core.rrb-vector.nodes 445 | clojure.core.rrb-vector.protocols 446 | clojure.core.rrb-vector.rrbt 447 | clojure.core.rrb-vector.transients 448 | clojure.core.server 449 | clojure.core.specs.alpha 450 | clojure.data 451 | clojure.data.avl 452 | clojure.data.int-map 453 | clojure.data.json 454 | clojure.data.priority-map 455 | clojure.datafy 456 | clojure.edn 457 | clojure.inspector 458 | clojure.instant 459 | clojure.java.browse 460 | clojure.java.browse-ui 461 | clojure.java.io 462 | clojure.java.javadoc 463 | clojure.java.shell 464 | clojure.main 465 | clojure.pprint 466 | clojure.reflect 467 | clojure.repl 468 | clojure.set 469 | clojure.spec.alpha 470 | clojure.spec.gen.alpha 471 | clojure.spec.test.alpha 472 | clojure.spec.test.check 473 | clojure.stacktrace 474 | clojure.string 475 | clojure.template 476 | clojure.test 477 | clojure.test.check.generators 478 | clojure.test.check.random 479 | clojure.test.check.rose-tree 480 | clojure.test.junit 481 | clojure.test.tap 482 | clojure.tools.analyzer 483 | clojure.tools.analyzer.ast 484 | clojure.tools.analyzer.env 485 | clojure.tools.analyzer.jvm 486 | clojure.tools.analyzer.jvm.utils 487 | clojure.tools.analyzer.passes 488 | clojure.tools.analyzer.passes.add-binding-atom 489 | clojure.tools.analyzer.passes.cleanup 490 | clojure.tools.analyzer.passes.constant-lifter 491 | clojure.tools.analyzer.passes.elide-meta 492 | clojure.tools.analyzer.passes.emit-form 493 | clojure.tools.analyzer.passes.jvm.analyze-host-expr 494 | clojure.tools.analyzer.passes.jvm.annotate-host-info 495 | clojure.tools.analyzer.passes.jvm.annotate-loops 496 | clojure.tools.analyzer.passes.jvm.annotate-tag 497 | clojure.tools.analyzer.passes.jvm.box 498 | clojure.tools.analyzer.passes.jvm.classify-invoke 499 | clojure.tools.analyzer.passes.jvm.constant-lifter 500 | clojure.tools.analyzer.passes.jvm.emit-form 501 | clojure.tools.analyzer.passes.jvm.fix-case-test 502 | clojure.tools.analyzer.passes.jvm.infer-tag 503 | clojure.tools.analyzer.passes.jvm.validate 504 | clojure.tools.analyzer.passes.jvm.validate-loop-locals 505 | clojure.tools.analyzer.passes.jvm.validate-recur 506 | clojure.tools.analyzer.passes.jvm.warn-on-reflection 507 | clojure.tools.analyzer.passes.source-info 508 | clojure.tools.analyzer.passes.trim 509 | clojure.tools.analyzer.passes.uniquify 510 | clojure.tools.analyzer.passes.warn-earmuff 511 | clojure.tools.analyzer.utils 512 | clojure.tools.macro 513 | clojure.tools.reader 514 | clojure.tools.reader.default-data-readers 515 | clojure.tools.reader.edn 516 | clojure.tools.reader.impl.commons 517 | clojure.tools.reader.impl.errors 518 | clojure.tools.reader.impl.inspect 519 | clojure.tools.reader.impl.utils 520 | clojure.tools.reader.reader-types 521 | clojure.uuid 522 | clojure.walk 523 | clojure.xml 524 | clojure.zip 525 | flatland.ordered.common 526 | flatland.ordered.map 527 | flatland.ordered.set 528 | flatland.useful.debug 529 | flatland.useful.experimental.delegate 530 | flatland.useful.fn 531 | flatland.useful.map 532 | flatland.useful.ns 533 | flatland.useful.utils 534 | generator.core 535 | grimoire.util 536 | guten-tag.core 537 | pathetic.core 538 | user 539 | -------------------------------------------------------------------------------- /src/clj-jvm/TODO.txt: -------------------------------------------------------------------------------- 1 | Add string literal and character literal examples to strings section, 2 | preferably with common escape sequences like \n \t and hex and octal, 3 | with link to a complete list. Fiddly bit is figuring out how to 4 | escape these properly when generating LaTeX. 5 | 6 | Possibly useful Java doc link for escape sequences inside strings: 7 | http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.10.6 8 | 9 | start at a diff that doesn't work for LaTeX: 10 | 11 | - :html "See also IO/to string"}]] 12 | + :html "See also IO/to string"} 13 | + "Literals:" 14 | + "\"foo\"" 15 | + "\"newline \\n tab \\t\"" 16 | + "\"quote \\\" backslash \\\\\"" 17 | +;; {:latex " \\href{http://en.wikipedia.org/wiki/UTF-16}{UTF-16}:" 18 | +;; :html "UTF-16:"} 19 | +;; "\"\\ua028 octal \\177\\"" 20 | + 21 | + ]] 22 | 23 | 24 | Other links within Clojure docs that might be linked to directly at 25 | appropriate places: 26 | 27 | http://clojure.org/reader#The%20Reader--extensible%20data%20notation%20%28edn%29 28 | http://clojure.org/reader#The%20Reader--Tagged%20Literals 29 | 30 | 31 | Links to tutorial-style articles for these topics: 32 | parsing/generating XML 33 | 34 | zippers - I found these nice blog articles linked to from the 35 | Clojure 1.2 version of clojure.zip/zipper on clojuredocs.org. I 36 | added the URLs to the Clojure 1.3 version, too. 37 | Brian Marick: "Editing" trees in Clojure with clojure.zip 38 | http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/ 39 | Alex Miller: Zippers with records in Clojure 40 | http://tech.puredanger.com/2010/10/22/zippers-with-records-in-clojure/ 41 | 42 | Leiningen 43 | Java classpaths, JARs, etc. 44 | Maybe this would be a good quick start to Leiningen and Java classpaths? 45 | http://www.unexpected-vortices.com/clojure/brief-beginners-guide/ 46 | 47 | This briefly describes several resources for those wanting to 48 | learn the Clojure language: 49 | http://www.elangocheran.com/blog/2012/03/the-newbies-guide-learning-clojure/ 50 | 51 | Introductory material on Lisp family languages, but not Clojure in particular: 52 | http://www.lisperati.com/clojure-spels/casting.html 53 | 54 | Intermediate to advanced material on Common Lisp macros: 55 | "On Lisp", Paul Graham, TBD: find link to free copy 56 | 57 | Add tooltips for links that do not go to clojuredocs.org. They don't 58 | have to be anything fancy -- just something that makes it obvious they 59 | are not doc strings, and the web page isn't 'broken'. 60 | 61 | Add some brief notes about how different types of arithmetic work: 62 | bigint contagion, operators that auto-convert to bigint if needed, 63 | unchecked operators intended only for primitive arith types. How to 64 | format/printf bigints and ratios. What else? 65 | 66 | ---------------------------------------- 67 | Symbols from more namespaces, or at least links to the namespaces: 68 | 69 | There are new contrib namespaces that are not mentioned anywhere. 70 | Make a list of all of them, annotated with which are in now, and which 71 | are not. Consider creating a link to documentation for the entire 72 | namespace somewhere on the cheatsheet, even if we don't include its 73 | individual symbols. 74 | 75 | Is this a complete list of new (i.e. Clojure 1.3) contrib libraries? 76 | 77 | http://clojure.github.com/ 78 | 79 | Is that list complete? Are there any on the following page that are 80 | not on the one above? 81 | 82 | https://github.com/clojure 83 | 84 | Which ones worth adding to cheatsheet? As of this time, it seems that 85 | there are no documentation pages for any of these on clojuredocs.org 86 | (I've filed a request asking if they plan to do so), but there are on 87 | clojure.github.com (linked to from the page above). 88 | 89 | 90 | Add links to entire namespaces on clojuredocs.org, e.g.: 91 | 92 | http://clojuredocs.org/clojure_core/clojure.java.io 93 | 94 | 95 | therenow clojure.core 96 | notthere clojure.core.protocols (and keep it notthere?) 97 | TBD clojure.core.reducers 98 | therenow clojure.data 99 | TBD clojure.inspector 100 | therenow clojure.java.browse (only clojure.java.browse/browse-url) 101 | notthere clojure.java.browse-ui (and keep it notthere?) 102 | therenow clojure.java.io 103 | therenow clojure.java.javadoc 104 | therenow clojure.java.shell (only sh, with-sh-env, with-sh-dir) 105 | TBD clojure.main (TBD: What is worth adding to cheatsheet, if any?) 106 | therenow clojure.pprint 107 | TBD clojure.reflect (only reflect) 108 | therenow clojure.repl 109 | therenow clojure.set 110 | TBD clojure.stacktrace (TBD: What is worth adding to cheatsheet, if any? Is anything here more useful in any way than clojure.repl/pst ?) 111 | therenow clojure.string 112 | TBDlo clojure.template 113 | TBD clojure.test 114 | therenow clojure.walk 115 | therenow clojure.xml (only parse so far. TBD: Anything else worth adding?) 116 | therenow clojure.zip 117 | 118 | Pages listing other Clojure libraries: 119 | http://www.clojure-toolbox.com/ 120 | http://cnlojure.org/open.html 121 | http://clojure-libraries.appspot.com/ 122 | 123 | TBD: Is there any chance of merging the above efforts into 1 site 124 | maintained at least as well as any of the existing ones? 125 | ---------------------------------------- 126 | 127 | 128 | Find good places to link to for macro things like the special syntax ` 129 | ~ ~@, and perhaps also link to there from the Macros section header. 130 | 131 | 132 | Give examples of syntax for type-hinting Java arrays of arbitrary Java 133 | classes, with the link below for details: 134 | 135 | http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html#getName%28%29 136 | 137 | Example in Abstractions section for extend-protocol 138 | 139 | Consider adding (def f ns/g) and (def f #'ns/g) distinction, and what 140 | it will do differently. Any good article or docs to link to for that? 141 | 142 | 143 | 144 | ---------------------------------------------------------------------- 145 | ns, require, use, import 146 | ---------------------------------------------------------------------- 147 | 148 | Give most common examples of ns use, with :import, :require, and :use 149 | 150 | Maybe also give the REPL equivalents of those expressions? 151 | 152 | See this article for ideas of things that could be adapted to put 153 | right into the cheatsheet: 154 | 155 | http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html 156 | ---------------------------------------------------------------------- 157 | 158 | 159 | Add java.io.DataOutputStream / java.io.DataInputStream links for 160 | binary I/O? 161 | 162 | java.util.Scanner might be nice to know about. 163 | 164 | distinct? doesn't really operate on collections. It is more like max, 165 | min, and some others in taking an arbitrarily large but variable 166 | number of arguments. Is there a better place it belongs than 167 | Collections/Content tests? 168 | 169 | Decide which if any of the following symbols should be included in the 170 | cheatsheet, and if so, where. 171 | 172 | First, a short list of things that seems like they are among the more 173 | significant ones to know about: 174 | 175 | bases 176 | class 177 | clojure.repl/dir 178 | clojure.repl/root-cause 179 | definterface 180 | extend 181 | extend-protocol 182 | extenders 183 | extends? 184 | satisfies? 185 | supers 186 | trampoline 187 | type 188 | underive 189 | with-bindings 190 | 191 | 192 | Next, a short list of deprecated things that definitely should not be 193 | in the cheat sheet: 194 | 195 | add-classpath :deprecated "1.1" (no documented replacement) 196 | agent-errors :deprecated "1.2" (use agent-error, which is in sheet) 197 | clear-agent-errors :deprecated "1.2" (use restart-agent, which is in sheet) 198 | replicate :deprecated "1.3" (use repeat, which is in sheet) 199 | 200 | There are a few other things in clojure.test, clojure.parallel (the 201 | whole namespace), and contrib lib tools.namespace, but that appears to 202 | be all of the Vars that are deprecated. 203 | 204 | 205 | 206 | 207 | Sorted list of 423 symbols in lookup table that were never used: 208 | 209 | *allow-unresolved-vars* 210 | *assert* 211 | *compiler-options* 212 | *flush-on-newline* 213 | *fn-loader* 214 | *math-context* 215 | *print-namespace-maps* 216 | *read-eval* 217 | *reader-resolver* 218 | *source-path* 219 | *suppress-read* 220 | *use-context-classloader* 221 | *verbose-defrecords* 222 | ->ArrayChunk 223 | ->Eduction 224 | ->Vec 225 | ->VecNode 226 | ->VecSeq 227 | -cache-protocol-fn 228 | -reset-methods 229 | EMPTY-NODE 230 | Inst 231 | PrintWriter-on 232 | Throwable->map 233 | accessor 234 | add-classpath 235 | add-tap 236 | agent-errors 237 | await1 238 | chunk 239 | chunk-append 240 | chunk-buffer 241 | chunk-cons 242 | chunk-first 243 | chunk-next 244 | chunk-rest 245 | chunked-seq? 246 | clear-agent-errors 247 | clojure.core.protocols/CollReduce 248 | clojure.core.protocols/Datafiable 249 | clojure.core.protocols/IKVReduce 250 | clojure.core.protocols/InternalReduce 251 | clojure.core.protocols/Navigable 252 | clojure.core.protocols/coll-reduce 253 | clojure.core.protocols/datafy 254 | clojure.core.protocols/internal-reduce 255 | clojure.core.protocols/kv-reduce 256 | clojure.core.protocols/nav 257 | clojure.core.reducers/->Cat 258 | clojure.core.reducers/CollFold 259 | clojure.core.reducers/append! 260 | clojure.core.reducers/cat 261 | clojure.core.reducers/coll-fold 262 | clojure.core.reducers/drop 263 | clojure.core.reducers/filter 264 | clojure.core.reducers/fjtask 265 | clojure.core.reducers/flatten 266 | clojure.core.reducers/fold 267 | clojure.core.reducers/foldcat 268 | clojure.core.reducers/folder 269 | clojure.core.reducers/map 270 | clojure.core.reducers/mapcat 271 | clojure.core.reducers/monoid 272 | clojure.core.reducers/pool 273 | clojure.core.reducers/reduce 274 | clojure.core.reducers/reducer 275 | clojure.core.reducers/remove 276 | clojure.core.reducers/take 277 | clojure.core.reducers/take-while 278 | clojure.core.server/*session* 279 | clojure.core.server/io-prepl 280 | clojure.core.server/prepl 281 | clojure.core.server/remote-prepl 282 | clojure.core.server/repl 283 | clojure.core.server/repl-init 284 | clojure.core.server/repl-read 285 | clojure.core.server/start-server 286 | clojure.core.server/start-servers 287 | clojure.core.server/stop-server 288 | clojure.core.server/stop-servers 289 | clojure.core.specs.alpha/even-number-of-forms? 290 | clojure.data/Diff 291 | clojure.data/EqualityPartition 292 | clojure.data/diff-similar 293 | clojure.data/equality-partition 294 | clojure.datafy/datafy 295 | clojure.datafy/nav 296 | clojure.inspector/atom? 297 | clojure.inspector/collection-tag 298 | clojure.inspector/get-child 299 | clojure.inspector/get-child-count 300 | clojure.inspector/inspect 301 | clojure.inspector/inspect-table 302 | clojure.inspector/inspect-tree 303 | clojure.inspector/is-leaf 304 | clojure.inspector/list-model 305 | clojure.inspector/list-provider 306 | clojure.inspector/old-table-model 307 | clojure.inspector/table-model 308 | clojure.inspector/tree-model 309 | clojure.instant/parse-timestamp 310 | clojure.instant/read-instant-calendar 311 | clojure.instant/read-instant-date 312 | clojure.instant/read-instant-timestamp 313 | clojure.instant/validated 314 | clojure.java.browse/*open-url-script* 315 | clojure.java.io/Coercions 316 | clojure.java.io/IOFactory 317 | clojure.java.io/default-streams-impl 318 | clojure.java.io/make-input-stream 319 | clojure.java.io/make-output-stream 320 | clojure.java.io/make-parents 321 | clojure.java.io/make-reader 322 | clojure.java.io/make-writer 323 | clojure.java.javadoc/*core-java-api* 324 | clojure.java.javadoc/*feeling-lucky* 325 | clojure.java.javadoc/*feeling-lucky-url* 326 | clojure.java.javadoc/*local-javadocs* 327 | clojure.java.javadoc/*remote-javadocs* 328 | clojure.java.javadoc/add-local-javadoc 329 | clojure.java.javadoc/add-remote-javadoc 330 | clojure.java.shell/*sh-dir* 331 | clojure.java.shell/*sh-env* 332 | clojure.main/demunge 333 | clojure.main/err->msg 334 | clojure.main/load-script 335 | clojure.main/main 336 | clojure.main/renumbering-read 337 | clojure.main/repl 338 | clojure.main/repl-caught 339 | clojure.main/repl-exception 340 | clojure.main/repl-prompt 341 | clojure.main/repl-read 342 | clojure.main/repl-requires 343 | clojure.main/report-error 344 | clojure.main/root-cause 345 | clojure.main/skip-if-eol 346 | clojure.main/skip-whitespace 347 | clojure.main/stack-element-str 348 | clojure.main/with-bindings 349 | clojure.main/with-read-known 350 | clojure.pprint/*print-base* 351 | clojure.pprint/*print-miser-width* 352 | clojure.pprint/*print-pprint-dispatch* 353 | clojure.pprint/*print-pretty* 354 | clojure.pprint/*print-radix* 355 | clojure.pprint/*print-right-margin* 356 | clojure.pprint/*print-suppress-namespaces* 357 | clojure.pprint/code-dispatch 358 | clojure.pprint/formatter 359 | clojure.pprint/formatter-out 360 | clojure.pprint/fresh-line 361 | clojure.pprint/get-pretty-writer 362 | clojure.pprint/pp 363 | clojure.pprint/pprint-indent 364 | clojure.pprint/pprint-logical-block 365 | clojure.pprint/pprint-newline 366 | clojure.pprint/pprint-tab 367 | clojure.pprint/print-length-loop 368 | clojure.pprint/set-pprint-dispatch 369 | clojure.pprint/simple-dispatch 370 | clojure.pprint/with-pprint-dispatch 371 | clojure.pprint/write 372 | clojure.pprint/write-out 373 | clojure.reflect/->AsmReflector 374 | clojure.reflect/->Constructor 375 | clojure.reflect/->Field 376 | clojure.reflect/->JavaReflector 377 | clojure.reflect/->Method 378 | clojure.reflect/ClassResolver 379 | clojure.reflect/Reflector 380 | clojure.reflect/TypeReference 381 | clojure.reflect/do-reflect 382 | clojure.reflect/flag-descriptors 383 | clojure.reflect/map->Constructor 384 | clojure.reflect/map->Field 385 | clojure.reflect/map->Method 386 | clojure.reflect/reflect 387 | clojure.reflect/resolve-class 388 | clojure.reflect/type-reflect 389 | clojure.reflect/typename 390 | clojure.repl/demunge 391 | clojure.repl/dir-fn 392 | clojure.repl/root-cause 393 | clojure.repl/set-break-handler! 394 | clojure.repl/source-fn 395 | clojure.repl/stack-element-str 396 | clojure.repl/thread-stopper 397 | clojure.spec.alpha/*coll-check-limit* 398 | clojure.spec.alpha/*coll-error-limit* 399 | clojure.spec.alpha/*compile-asserts* 400 | clojure.spec.alpha/*fspec-iterations* 401 | clojure.spec.alpha/*recursion-limit* 402 | clojure.spec.alpha/Spec 403 | clojure.spec.alpha/Specize 404 | clojure.spec.alpha/abbrev 405 | clojure.spec.alpha/alt-impl 406 | clojure.spec.alpha/amp-impl 407 | clojure.spec.alpha/and-spec-impl 408 | clojure.spec.alpha/assert* 409 | clojure.spec.alpha/cat-impl 410 | clojure.spec.alpha/conform* 411 | clojure.spec.alpha/def-impl 412 | clojure.spec.alpha/describe* 413 | clojure.spec.alpha/every-impl 414 | clojure.spec.alpha/explain* 415 | clojure.spec.alpha/explain-data* 416 | clojure.spec.alpha/fspec-impl 417 | clojure.spec.alpha/gen* 418 | clojure.spec.alpha/invalid? 419 | clojure.spec.alpha/map-spec-impl 420 | clojure.spec.alpha/maybe-impl 421 | clojure.spec.alpha/merge-spec-impl 422 | clojure.spec.alpha/multi-spec-impl 423 | clojure.spec.alpha/nilable-impl 424 | clojure.spec.alpha/nonconforming 425 | clojure.spec.alpha/or-spec-impl 426 | clojure.spec.alpha/regex-spec-impl 427 | clojure.spec.alpha/regex? 428 | clojure.spec.alpha/rep+impl 429 | clojure.spec.alpha/rep-impl 430 | clojure.spec.alpha/spec-impl 431 | clojure.spec.alpha/specize* 432 | clojure.spec.alpha/tuple 433 | clojure.spec.alpha/tuple-impl 434 | clojure.spec.alpha/unform* 435 | clojure.spec.alpha/with-gen* 436 | clojure.spec.gen.alpha/any 437 | clojure.spec.gen.alpha/any-printable 438 | clojure.spec.gen.alpha/bind 439 | clojure.spec.gen.alpha/boolean 440 | clojure.spec.gen.alpha/bytes 441 | clojure.spec.gen.alpha/cat 442 | clojure.spec.gen.alpha/char 443 | clojure.spec.gen.alpha/char-alpha 444 | clojure.spec.gen.alpha/char-alphanumeric 445 | clojure.spec.gen.alpha/char-ascii 446 | clojure.spec.gen.alpha/choose 447 | clojure.spec.gen.alpha/delay 448 | clojure.spec.gen.alpha/delay-impl 449 | clojure.spec.gen.alpha/double 450 | clojure.spec.gen.alpha/double* 451 | clojure.spec.gen.alpha/elements 452 | clojure.spec.gen.alpha/fmap 453 | clojure.spec.gen.alpha/for-all* 454 | clojure.spec.gen.alpha/frequency 455 | clojure.spec.gen.alpha/gen-for-name 456 | clojure.spec.gen.alpha/gen-for-pred 457 | clojure.spec.gen.alpha/generate 458 | clojure.spec.gen.alpha/hash-map 459 | clojure.spec.gen.alpha/int 460 | clojure.spec.gen.alpha/keyword 461 | clojure.spec.gen.alpha/keyword-ns 462 | clojure.spec.gen.alpha/large-integer 463 | clojure.spec.gen.alpha/large-integer* 464 | clojure.spec.gen.alpha/lazy-combinator 465 | clojure.spec.gen.alpha/lazy-combinators 466 | clojure.spec.gen.alpha/lazy-prim 467 | clojure.spec.gen.alpha/lazy-prims 468 | clojure.spec.gen.alpha/list 469 | clojure.spec.gen.alpha/map 470 | clojure.spec.gen.alpha/not-empty 471 | clojure.spec.gen.alpha/one-of 472 | clojure.spec.gen.alpha/quick-check 473 | clojure.spec.gen.alpha/ratio 474 | clojure.spec.gen.alpha/return 475 | clojure.spec.gen.alpha/sample 476 | clojure.spec.gen.alpha/set 477 | clojure.spec.gen.alpha/shuffle 478 | clojure.spec.gen.alpha/simple-type 479 | clojure.spec.gen.alpha/simple-type-printable 480 | clojure.spec.gen.alpha/string 481 | clojure.spec.gen.alpha/string-alphanumeric 482 | clojure.spec.gen.alpha/string-ascii 483 | clojure.spec.gen.alpha/such-that 484 | clojure.spec.gen.alpha/symbol 485 | clojure.spec.gen.alpha/symbol-ns 486 | clojure.spec.gen.alpha/tuple 487 | clojure.spec.gen.alpha/uuid 488 | clojure.spec.gen.alpha/vector 489 | clojure.spec.gen.alpha/vector-distinct 490 | clojure.stacktrace/e 491 | clojure.stacktrace/print-cause-trace 492 | clojure.stacktrace/print-stack-trace 493 | clojure.stacktrace/print-throwable 494 | clojure.stacktrace/print-trace-element 495 | clojure.stacktrace/root-cause 496 | clojure.template/apply-template 497 | clojure.template/do-template 498 | clojure.test.junit/*depth* 499 | clojure.test.junit/*var-context* 500 | clojure.test.junit/element-content 501 | clojure.test.junit/error-el 502 | clojure.test.junit/failure-el 503 | clojure.test.junit/finish-case 504 | clojure.test.junit/finish-element 505 | clojure.test.junit/finish-suite 506 | clojure.test.junit/indent 507 | clojure.test.junit/junit-report 508 | clojure.test.junit/message-el 509 | clojure.test.junit/package-class 510 | clojure.test.junit/start-case 511 | clojure.test.junit/start-element 512 | clojure.test.junit/start-suite 513 | clojure.test.junit/suite-attrs 514 | clojure.test.junit/test-name 515 | clojure.test.junit/with-junit-output 516 | clojure.test.tap/print-diagnostics 517 | clojure.test.tap/print-tap-diagnostic 518 | clojure.test.tap/print-tap-fail 519 | clojure.test.tap/print-tap-pass 520 | clojure.test.tap/print-tap-plan 521 | clojure.test.tap/tap-report 522 | clojure.test.tap/with-tap-output 523 | clojure.test/*initial-report-counters* 524 | clojure.test/*load-tests* 525 | clojure.test/*report-counters* 526 | clojure.test/*stack-trace-depth* 527 | clojure.test/*test-out* 528 | clojure.test/*testing-contexts* 529 | clojure.test/*testing-vars* 530 | clojure.test/are 531 | clojure.test/assert-any 532 | clojure.test/assert-expr 533 | clojure.test/assert-predicate 534 | clojure.test/compose-fixtures 535 | clojure.test/deftest 536 | clojure.test/deftest- 537 | clojure.test/do-report 538 | clojure.test/file-position 539 | clojure.test/function? 540 | clojure.test/get-possibly-unbound-var 541 | clojure.test/inc-report-counter 542 | clojure.test/is 543 | clojure.test/join-fixtures 544 | clojure.test/report 545 | clojure.test/run-all-tests 546 | clojure.test/run-tests 547 | clojure.test/set-test 548 | clojure.test/successful? 549 | clojure.test/test-all-vars 550 | clojure.test/test-ns 551 | clojure.test/test-var 552 | clojure.test/test-vars 553 | clojure.test/testing 554 | clojure.test/testing-contexts-str 555 | clojure.test/testing-vars-str 556 | clojure.test/try-expr 557 | clojure.test/use-fixtures 558 | clojure.test/with-test 559 | clojure.test/with-test-out 560 | clojure.walk/keywordize-keys 561 | clojure.walk/stringify-keys 562 | clojure.xml/*current* 563 | clojure.xml/*sb* 564 | clojure.xml/*stack* 565 | clojure.xml/*state* 566 | clojure.xml/attrs 567 | clojure.xml/content 568 | clojure.xml/content-handler 569 | clojure.xml/element 570 | clojure.xml/emit 571 | clojure.xml/emit-element 572 | clojure.xml/startparse-sax 573 | clojure.xml/tag 574 | create-struct 575 | defstruct 576 | delay? 577 | denominator 578 | destructure 579 | find-protocol-impl 580 | find-protocol-method 581 | hash-combine 582 | hash-ordered-coll 583 | hash-unordered-coll 584 | inst-ms 585 | inst-ms* 586 | method-sig 587 | mix-collection-hash 588 | munge 589 | namespace-munge 590 | numerator 591 | primitives-classnames 592 | print-ctor 593 | print-dup 594 | print-method 595 | print-simple 596 | proxy-call-with-super 597 | proxy-name 598 | read 599 | read+string 600 | read-string 601 | reader-conditional 602 | reader-conditional? 603 | refer-clojure 604 | remove-tap 605 | replicate 606 | special-symbol? 607 | struct 608 | struct-map 609 | tagged-literal 610 | tagged-literal? 611 | tap> 612 | unchecked-add-int 613 | unchecked-byte 614 | unchecked-char 615 | unchecked-dec-int 616 | unchecked-divide-int 617 | unchecked-double 618 | unchecked-float 619 | unchecked-inc-int 620 | unchecked-int 621 | unchecked-long 622 | unchecked-multiply-int 623 | unchecked-negate-int 624 | unchecked-remainder-int 625 | unchecked-short 626 | unchecked-subtract-int 627 | unquote 628 | unquote-splicing 629 | with-bindings 630 | with-bindings* 631 | with-loading-context 632 | -------------------------------------------------------------------------------- /src/clj-jvm/CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | April 19, 2022 - Clojure 1.8 - 1.11, sheet v55 3 | 4 | I forgot about the new clojure.math namespace added to Clojure 1.11, 5 | and so neglected to document which of the new Vars added to that 6 | namespace were added to the cheatsheet, versus which were not. Here 7 | is a complete list of them, without their "clojure.math/" namespace 8 | qualifier: 9 | 10 | New things in clojure.math namespace of Clojure 1.11 that have _not_ 11 | been added to the sheet at this time: 12 | 13 | IEEE-remainder add-exact copy-sign cosh decrement-exact 14 | get-exponent hypot increment-exact multiply-exact negate-exact 15 | next-after next-down next-up scalb signum sinh subtract-exact tanh 16 | to-degrees to-radians ulp 17 | 18 | New things in clojure.math namespace of Clojure 1.11 that have been 19 | added to the sheet in this version: 20 | 21 | Added to Primitives / Numbers / Arithmetic section: 22 | 23 | floor-div floor-mod 24 | ceil floor rint round 25 | pow sqrt cbrt 26 | E exp expm1 log log10 log1p 27 | PI sin cos tan asin acos atan atan2 28 | 29 | Added to Primitives / Numbers / Random section: 30 | 31 | random 32 | 33 | Changed links to a couple of Github repos in organization 34 | https://github.com/amalloy to point to to their new home in 35 | https://github.com/clj-commons 36 | 37 | Updated links to new Vars in Clojure 1.10 to point at ClojureDocs.org 38 | web site. When I created the first version of the cheatsheet with 39 | these then-new Clojure 1.10 Vars, they did not exist yet on 40 | ClojureDocs.org, so I made their occurrences on the cheatsheet link to 41 | their official API docs instead. 42 | 43 | --------------------------------------------------------------------- 44 | April 15, 2022 - Clojure 1.8 - 1.11, sheet v54 45 | 46 | New things for Clojure 1.11 that have been added to the sheet in this 47 | version: 48 | 49 | Added to Sequences / Creating a Lazy Seq / From producer fn section: 50 | 51 | iteration 52 | 53 | Unless the subtle bugs in the core.rrb-vector library are fixed, it 54 | seems best not to point people towards it in the cheatsheet. Removed 55 | all mentions of it in this version. 56 | 57 | --------------------------------------------------------------------- 58 | April 15, 2022 - Clojure 1.8 - 1.11, sheet v53 59 | 60 | Made 'minimum version' Clojure 1.8, removing all (1.8) tags marking 61 | things as new in 1.8. Tags for things new in (1.9) (1.10) are still 62 | present, as are tags (1.11) for things new in Clojure 1.11.0. 63 | 64 | New things for Clojure 1.11 that have _not_ been added to the sheet at 65 | this time: 66 | 67 | clojure.test/run-test 68 | clojure.test/run-test-var 69 | clojure.xml/disable-external-entities 70 | clojure.xml/sax-parser 71 | clojure.xml/startparse-sax-safe 72 | seq-to-map-for-destructuring 73 | iteration (I plan to add iteration soon, after getting 74 | recommendations on where to add it.) 75 | 76 | New things for Clojure 1.11 that have been added to the sheet in this 77 | version: 78 | 79 | Added to Primitives / Numbers / Arithmetic section: 80 | 81 | abs 82 | 83 | Added to Primitives / Numbers / Test section: 84 | 85 | NaN? infinite? 86 | 87 | Added to Primitives / Strings / Use section: 88 | 89 | parse-boolean parse-double parse-long parse-uuid 90 | 91 | Added to Collections / Maps / 'Change' section: 92 | 93 | update-keys update-vals 94 | 95 | Added to Other / Misc section: 96 | 97 | random-uuid 98 | 99 | --------------------------------------------------------------------- 100 | September 28, 2020 - Clojure 1.7 - 1.10, sheet v52 101 | 102 | Updated the version of Clojure used to generate the cheatsheet from 103 | 1.10.1 to 10.10.2-alpha2, which corrected the doc strings printed for 104 | special forms, no longer repeating a significant part of their 105 | contents twice. 106 | 107 | Also updated the version of many other libraries such as data.json, 108 | core.async, etc. The only effect of this was that one of the 109 | core.async functions or macros had an additional couple of sentences 110 | in its doc string. 111 | 112 | Removed one dependency in the cheat sheet generator program, by 113 | copying the one tiny function used from there (same EPL license) into 114 | the generator program. 115 | 116 | --------------------------------------------------------------------- 117 | December 23, 2019 - Clojure 1.7 - 1.10, sheet v51 118 | 119 | --------------------------------------------------------------------- 120 | December 22, 2019 - Clojure 1.7 - 1.10, sheet v50 121 | 122 | For those variants of the cheatsheet that included summary data about 123 | the number of ClojureDocs examples and notes there are, and what the 124 | see-also symbols are, they are now generated from a version of the 125 | ClojureDocs.org site data from late 2018, instead of late 2014 as it 126 | has been for 5 years now. 127 | 128 | --------------------------------------------------------------------- 129 | June 20, 2019 - Clojure 1.7 - 1.10, sheet v49 130 | 131 | Added new section Datafy with these functions: 132 | 133 | clojure.datafy/datafy 134 | clojure.datafy/nav 135 | 136 | Added new section IO / tap with these functions: 137 | 138 | tap> add-tap remove-tap 139 | 140 | Added these functions to section Java Interoperation / Exceptions: 141 | 142 | clojure.core/Throwable->map 143 | clojure.main/err->msg 144 | clojure.main/report-error 145 | 146 | --------------------------------------------------------------------- 147 | June 14, 2019 - Clojure 1.7 - 1.10, sheet v48 148 | 149 | Added these two functions, which were somehow left out before: 150 | 151 | clojure.edn/read 152 | clojure.edn/read-string 153 | 154 | --------------------------------------------------------------------- 155 | December 17, 2018 - Clojure 1.7 - 1.10, sheet v47 156 | 157 | Additional new things in Clojure 1.10, not mentioned in v46 comments 158 | below, that have _not_ been added to the sheet at this time: 159 | 160 | clojure.datafy/datafy 161 | clojure.datafy/nav 162 | clojure.main/renumbering-read 163 | 164 | Additional new things for Clojure 1.10 that have been added to the 165 | sheet in this version: 166 | 167 | Added to Namespace / From symbol section: 168 | 169 | requiring-resolve 170 | 171 | --------------------------------------------------------------------- 172 | October 12, 2018 - Clojure 1.7 - 1.10, sheet v46 173 | 174 | Made 'minimum version' Clojure 1.7, removing all (1.7) tags marking 175 | things as new in 1.7. Tags for things new in (1.8) (1.9) are still 176 | present, as are tags (1.10) for things new in Clojure 1.10.0. 177 | 178 | New things for Clojure 1.10 that have _not_ been added to the sheet at 179 | this time: 180 | 181 | PrintWriter-on read+string 182 | add-tap remove-tap tap> 183 | 184 | clojure.core.protocols/Datafiable clojure.core.protocols/Navigable 185 | clojure.core.protocols/datafy clojure.core.protocols/nav 186 | 187 | clojure.core.server/io-prepl clojure.core.server/prepl 188 | clojure.core.server/remote-prepl 189 | 190 | clojure.core.specs.alpha/even-number-of-forms? 191 | clojure.spec.gen.alpha/shuffle 192 | 193 | New things for Clojure 1.10 that have been added to the sheet in this 194 | version: 195 | 196 | Added to Java Interoperation / Exceptions section: 197 | 198 | ex-cause ex-message clojure.main/ex-str 199 | 200 | --------------------------------------------------------------------- 201 | August 28, 2018 - Clojure 1.6 - 1.9, sheet v45 202 | 203 | Added #: and ## to Special Characters section. 204 | 205 | Corrected link to Java .lastIndexOf method to be in class 206 | java.util.List, which is the interface that Clojure's lists and 207 | vectors implement, not interface java.util.Vector as the link was 208 | before. 209 | 210 | --------------------------------------------------------------------- 211 | March 19, 2018 - Clojure 1.6 - 1.9, sheet v44 212 | 213 | Corrected link to Spec guide page on clojure.org 214 | 215 | Added these predicates for numbers, added in Clojure 1.9, to the 216 | section Primitives / Numbers / Test: 217 | 218 | double? int? nat-int? neg-int? pos-int? 219 | 220 | They were added to the new "Spec" section of the cheatsheet earlier, 221 | but it seems reasonable to add them in Primitives / Numbers / Test, 222 | too. 223 | 224 | 225 | --------------------------------------------------------------------- 226 | December 16, 2017 - Clojure 1.6 - 1.9, sheet v43 227 | 228 | Categorization of spec-related functions and macros from Alex Miller: 229 | 230 | Operations: 231 | valid? conform unform 232 | explain explain-data explain-str explain-out 233 | form describe 234 | assert check-asserts check-asserts? 235 | 236 | Generator operations: 237 | gen 238 | exercise exercise-fn 239 | 240 | Spec definitions and registry: 241 | def fdef 242 | registry 243 | get-spec 244 | spec? 245 | spec with-gen 246 | 247 | Logical specs: 248 | and, or 249 | 250 | Collection specs: 251 | coll-of, map-of - fully realizing coll specs 252 | every, every-kv - sampling coll specs 253 | keys - attribute maps 254 | merge - combining map specs 255 | 256 | Regex specs: 257 | cat alt * + ? & keys* 258 | 259 | Range specs: 260 | int-in inst-in double-in 261 | int-in-range? inst-in-range? 262 | 263 | Other spec functions: 264 | nilable (also nonconforming which is currently undocumented, but useful) 265 | multi-spec - multimethod spec 266 | fspec - anonymous function spec 267 | conformer 268 | 269 | Custom explain printer: 270 | explain-printer 271 | *explain-out* 272 | 273 | --------------------------------------------------------------------- 274 | December 14, 2017 - Clojure 1.6 - 1.9, sheet v42 275 | 276 | Made 'minimum version' Clojure 1.6, removing all (1.6) tags marking 277 | things as new in 1.6. Tags for things new in (1.7) (1.8) are still 278 | present, as are tags (1.9) for things new in Clojure 1.9.0. 279 | 280 | New things for Clojure 1.9 that have _not_ been added to the sheet at 281 | this time: 282 | 283 | *print-namespace-maps* *reader-resolver* Inst inst-ms inst-ms* 284 | 285 | New things for Clojure 1.9 that have been added to the sheet in this 286 | version: 287 | 288 | New in Concurrency / Atoms: reset-vals! swap-vals! 289 | New in Collections / Collections / Generic Ops: bounded-count 290 | New in Transducers / Off the shelf: halt-when 291 | New in Java Interoperation / Exceptions: StackTraceElement->vec 292 | 293 | Predicate functions that all have generators defined for them in 294 | version 0.9.0 of test.check are listed below, divided into a few 295 | categories. Many are new in Clojure 1.9, but many existed before. 296 | 297 | numbers: (pre 1.9) number? rational? integer? ratio? decimal? 298 | float? zero? (1.9) double? int? nat-int? neg-int? pos-int? 299 | 300 | symbols, keywords: (pre 1.9) keyword? symbol? (1.9) ident? 301 | qualified-ident? qualified-keyword? qualified-symbol? 302 | simple-ident? simple-keyword? simple-symbol? 303 | 304 | other scalar types: (pre 1.9) string? true? false? nil? some? 305 | (1.9) boolean? bytes? inst? uri? uuid? 306 | 307 | collections: (pre 1.9) list? map? set? vector? associative? coll? 308 | sequential? seq? empty? (1.9) indexed? seqable? 309 | 310 | other: (1.9) any? 311 | 312 | The functions below have no generator defined for them in version 313 | 0.9.0 of test.check. They are listed here solely because I was 314 | composing a list of all predicate functions in Clojure, to determine 315 | which ones had generators in test.check, vs. which did not. 316 | 317 | Those that take any type of argument, without throwing exceptions: 318 | 319 | reduced? sorted? counted? reversible? record? map-entry? fn? ifn? 320 | var? future? volatile? class? 321 | 322 | Those that throw exceptions for some types of arguments: 323 | 324 | pos? neg? even? odd? realized? bound? thread-bound? future-done? 325 | future-cancelled? 326 | 327 | Vars in clojure.spec.alpha and related namespaces documented in spec 328 | guide at: https://clojure.org/guides/spec 329 | 330 | I will try to categorize these and add them to the sheet in a future 331 | version. I don't know enough to give them a good categorization yet. 332 | 333 | (require '[clojure.spec.alpha :as s]) 334 | (require '[clojure.spec.gen.alpha :as gen]) 335 | (require '[clojure.spec.test.alpha :as stest]) 336 | 337 | s/conform s/valid? s/def s/explain s/explain-data s/keys s/keys* s/merge 338 | s/and s/or s/nilable s/multi-spec s/coll-of s/tuple s/cat s/map-of 339 | s/alt s/* s/+ s/? s/& s/spec 340 | s/assert s/check-asserts s/fdef s/fspec 341 | s/gen 342 | gen/generate gen/sample 343 | s/exercise s/exercise-fn 344 | gen/fmap gen/such-that gen/string-alphanumeric gen/tuple 345 | s/with-gen 346 | s/int-in s/inst-in s/double-in 347 | 348 | stest/instrument stest/check stest/abbrev-result 349 | stest/enumerate-namespace stest/summarize-results 350 | stest/unstrument 351 | 352 | Predicates from earlier versions of Clojure that can only take 353 | particular types as arguments, or else they throw an exception: 354 | 355 | zero? pos? neg? even? odd? clojure.string/blank? realized? 356 | clojure.zip/branch? clojure.zip/end? empty? bound? thread-bound? 357 | future-done? future-cancelled? 358 | 359 | Predicates in earlier versions of Clojure that require more than one 360 | argument: 361 | 362 | clojure.string/starts-with? clojure.string/ends-with? 363 | clojure.string/includes? identical? instance? every? not-every? 364 | not-any? contains? clojure.set/subseT? clojure.set/superset? 365 | satisfies? extends? isa? distinct? 366 | 367 | distinct? doesn't require more than one argument, but is really meant 368 | for collections, not individual values. 369 | 370 | --------------------------------------------------------------------- 371 | November 11, 2017 - Clojure 1.5 - 1.8, sheet v41 372 | 373 | Updated list of keyword literal examples in Primitives/Other section. 374 | Added the ::namespace-alias/kw case, which had not been mentioned 375 | before. Replace "ns" abbreviations with "namespace". 376 | 377 | --------------------------------------------------------------------- 378 | July 12, 2017 - Clojure 1.5 - 1.8, sheet v40 379 | 380 | Update org.flatland/ordered dependency to newly released version 381 | 1.5.5, which has updated doc strings for the ordered-set and 382 | ordered-map functions. Better tooltips in the cheatsheet! 383 | 384 | --------------------------------------------------------------------- 385 | June 17, 2017 - Clojure 1.5 - 1.8, sheet v39 386 | 387 | Update links from http to https, except for this one, which doesn't 388 | support https: http://www.regular-expressions.info 389 | 390 | Update Oracle documentation links from JDK7 to JDK8. State of Clojure 391 | 2016 survey indicates that over 90% of Clojure/Java users use JDK8. 392 | 393 | Fixed a couple of stale links to anchors within the page 394 | https://clojure.org/reference/reader 395 | 396 | --------------------------------------------------------------------- 397 | June 17, 2017 - Clojure 1.5 - 1.8, sheet v38 398 | 399 | Replace link from blog article "Weird and Wonderful Characters of 400 | Clojure" to instead link link to the new "Reading Clojure Characters" 401 | Clojure guide that started from the blog article, then enhanced it: 402 | https://clojure.org/guides/weird_characters 403 | 404 | Add to "Special Characters" section the core.async macros >!! ! 405 | ->> 527 | *foo* earmuffs - convention to indicate dynamic vars 528 | ? predicate marker (unenforced convention) 529 | ! unsafe operations (unenforced convention) 530 | _ unused var (unenforced convention) 531 | 532 | --------------------------------------------------------------------- 533 | May 31, 2015 - Clojure 1.3 - 1.6, sheet v27 534 | 535 | Add clojure.data.int-map/int-set, dense-int-set, and int-map. 536 | 537 | Split Sets/Create section into Sets/Create unsorted and Sets/Create 538 | sorted. Similarly for Maps/Create. 539 | 540 | Made more of the functions in these sections show their doc strings in 541 | tooltip versions of cheatsheet. 542 | 543 | --------------------------------------------------------------------- 544 | May 22, 2015 - Clojure 1.3 - 1.6, sheet v26 545 | 546 | Add underive to section Multimethods/Relation 547 | 548 | --------------------------------------------------------------------- 549 | May 21, 2015 - Clojure 1.3 - 1.6, sheet v25 550 | 551 | Added definterface to section Java Interoperation/General. Moved 552 | gen-class and gen-interface to that section, from where they were in 553 | Other/Code. 554 | 555 | Added clojure.repl/dir to section Documentation. 556 | 557 | Added sequence to section Sequences/Creating a Lazy Seq/From 558 | collection. 559 | 560 | ---------------------------------------------------------------------- 561 | Mar 22, 2015 - Clojure 1.3 - 1.6, sheet v24 562 | 563 | Added new section Collections/Queues for Clojure's persistent queues. 564 | 565 | Changed literal example of list in Collections/List/Create from '() to 566 | (). The quote is unnecessary for an empty list. Reason it was 567 | probably there: quoting is more commonly used for lists with one or 568 | more values in them than for other collections, to avoid treatment of 569 | the list as a function call or macro invocation. 570 | 571 | ---------------------------------------------------------------------- 572 | Feb 24, 2015 - Clojure 1.3 - 1.6, sheet v23 573 | 574 | Added data.avl constructors for sorted sets and sorted maps: 575 | 576 | clojure.data.avl/sorted-set 577 | clojure.data.avl/sorted-set-by 578 | clojure.data.avl/sorted-map 579 | clojure.data.avl/sorted-map-by 580 | 581 | ---------------------------------------------------------------------- 582 | Feb 6, 2015 - Clojure 1.3 - 1.6, sheet v22 583 | 584 | Removed = and not= from Numbers/Compare section. It already had ==, 585 | which is more appropriate for comparing numeric values than =, because 586 | of the cross-type comparisons where = always returns false, and not= 587 | always returns true, e.g. float/double vs. any integral type, 588 | float/double vs. BigDecimal, any integral type vs. BigDecimal. 589 | 590 | Removed == from Misc/Compare section since it was already in 591 | Numbers/Compare section, and is redundant and perhaps confusing in 592 | Misc section. 593 | 594 | Added examples of literals for strings, characters, symbols, keywords. 595 | Also added new Other/Misc section with literals true, false, and nil. 596 | All have links to the clojure.org "Reader" documentation page, 597 | straight to the anchor for "Reader forms" giving documentation for 598 | syntax. 599 | 600 | ---------------------------------------------------------------------- 601 | Feb 3, 2015 - Clojure 1.3 - 1.6, sheet v21 602 | 603 | Added (my-map k) -> (get my-map k) shorthand to Maps/Examine. 604 | 605 | Move mapv and filterv from Vectors/Ops to Vectors/Create. Also add 606 | them to Using a Seq/Construct coll. They return a vector, but they 607 | can take any collection as an argument, so Vector/Ops wasn't really 608 | appropriate. 609 | 610 | Add reduce-kv to Maps/Ops. Previously it was only mentioned under 611 | Vectors, but its primary use is likely for maps. 612 | 613 | Add Sets/Sorted sets section with same functions as in Maps/Sorted 614 | maps, since those functions work on sorted sets, too. 615 | 616 | 617 | ---------------------------------------------------------------------- 618 | Dec 19, 2014 - Clojure 1.3 - 1.6, sheet v20 619 | 620 | Grimoire 0.4.0 fixes and updates, thanks to Reid McKenzie and Alex 621 | Robbins. 622 | 623 | Add set! to Special Forms section. It was only in the Java interop 624 | section before, but of course it is also useful for setting 625 | thread-local bindings of Vars. 626 | 627 | ---------------------------------------------------------------------- 628 | Nov 26, 2014 - Clojure 1.3 - 1.6, sheet v19 629 | 630 | Added a few other kinds of sorted sets and sorted maps: 631 | 632 | flatland.ordered.set/ordered-set 633 | flatland.ordered.map/ordered-map 634 | clojure.data.priority-map/priority-map 635 | flatland.useful.map/ordering-map 636 | 637 | ---------------------------------------------------------------------- 638 | Nov 25, 2014 - Clojure 1.3 - 1.6, sheet v18 639 | 640 | Added many links to "Reader Macros" section, including to specific 641 | anchor points within http://clojure.org/reader that are now available. 642 | 643 | ---------------------------------------------------------------------- 644 | Sep 14, 2014 - Clojure 1.3 - 1.6, sheet v17 645 | 646 | Added some functions previously not in cheatsheet: 647 | 648 | extends? - Now in Protocols/Test 649 | extend extend-protocol extenders - New section Protocols/Other 650 | class? bases supers type - Now in Java Interoperation/General 651 | 652 | Also some Java String methods: 653 | 654 | .startsWith .endsWith .contains - Now in Strings/Test 655 | 656 | Add link to Java API for BigInteger in Numbers/Bitwise section, since 657 | Clojure bitwise functions only work on Longs and smaller. 658 | 659 | Update Java API links to Java 7. Java API links were to Java 6 docs 660 | in earlier cheatsheet versions. 661 | 662 | ---------------------------------------------------------------------- 663 | Aug 29, 2014 - Clojure 1.3 - 1.6, sheet v16 664 | 665 | Reorganized some operations on sets, maps, and relations. 666 | 667 | Moved Rel algebra operations out of Set and into its own section 668 | Relations, after Maps. 669 | 670 | Added Sets/Set Ops section in place of Sets/Rel algebra. It includes 671 | only those operations that are for sets, but not specifically for 672 | relations (e.g. union, intersection). Added see also to Relations 673 | section. 674 | 675 | Removed section Sets/Get map and moved the operations that were there 676 | to more appropriate places: 677 | 678 | clojure.set/map-invert - Now in Maps/'Change' 679 | clojure.set/rename-keys - Now in Maps/'Change' 680 | clojure.set/index - Now in Maps/Create and Relations/Rel algebra 681 | clojure.set/rename - Now in Relations/Rel algebra 682 | 683 | Added link to Medley library in Maps/'Change' section. I know that 684 | Medley is not limited to functions in that category, but it definitely 685 | contains several useful functions in that category, e.g. map-keys, 686 | map-vals, filter-keys, filter-vals. 687 | 688 | ---------------------------------------------------------------------- 689 | Jul 13, 2014 - Clojure 1.3 - 1.6, sheet v15 690 | 691 | Expanded out the abbreviated common prefixes/suffixes. This makes it 692 | possible to search for all of those vars by their normal names, at the 693 | cost of making the cheatsheet only slightly longer. 694 | 695 | Removed unchecked-add-int, etc. in favor of the long versions, since 696 | longs are more commonly used in Clojure than ints. Note that there 697 | are unchecked-divide-int and unchecked-remainder-int, but Clojure has 698 | never had unchecked-divide nor unchecked-remainder, at least as of 699 | Clojure 1.6. 700 | 701 | ---------------------------------------------------------------------- 702 | Jun 15, 2014 - Clojure 1.3 - 1.6, sheet v14 703 | 704 | Added vars that were not in the cheat sheet before: 705 | 706 | trampoline added to Functions/Call 707 | satisfies? added to Abstractions/Protocols/Test 708 | record? added to Abstractions/Records/Test 709 | the-ns added to Namespace/From symbol 710 | class added to Java Interoperation/General 711 | 712 | ---------------------------------------------------------------------- 713 | Mar 26, 2014 - Clojure 1.3 - 1.6, sheet v13 714 | 715 | Added new vars for Clojure 1.6.0: 716 | 717 | unsigned-bit-shift-right added to Primitives/Numbers/Bitwise 718 | record? added to Collections/Collections/Type tests 719 | some? added to Collections/Misc/Test 720 | if-some, when-some added to Macros/Branch and Vars and Special 721 | Forms/Binding Forms 722 | 723 | The following new vars in Clojure 1.6.0 were not added to the cheat 724 | sheet, sincet they seem fairly specialized for those implementing 725 | their own collections: 726 | 727 | hash-ordered-coll, hash-unordered-coll, mix-collection-hash 728 | 729 | ---------------------------------------------------------------------- 730 | Oct 2, 2013 - Clojure 1.3 - 1.5, sheet v12 731 | 732 | Added next to section Sequences/Seq in, Seq out/Tail-items 733 | 734 | ---------------------------------------------------------------------- 735 | Aug 27, 2013 - Clojure 1.3 - 1.5, sheet v11 736 | 737 | Added link to Chas Emerick's handy Clojure type selection flowchart 738 | after the headings of the Abstrations and Proxy sections: 739 | https://github.com/cemerick/clojure-type-selection-flowchart 740 | 741 | Removed from Numbers/Test section: nil? and identical? did not really 742 | belong there. 743 | 744 | Added to Numbers/Test section: number? rational? integer? ratio? 745 | decimal? float? 746 | 747 | Added to Vars/Var objects section: bound? thread-bound? 748 | 749 | ---------------------------------------------------------------------- 750 | Mar 1, 2013 - Clojure 1.3 - 1.5, sheet v10 751 | 752 | Added letfn to Special forms section 753 | 754 | ---------------------------------------------------------------------- 755 | Mar 1, 2013 - Clojure 1.3 - 1.5, sheet v9 756 | 757 | Added these new symbols added in Clojure 1.5: 758 | 759 | re-quote-replacement 760 | *default-data-reader-fn* 761 | as-> cond-> cond->> some-> some->> 762 | send-via set-agent-send-executor! set-agent-send-off-executor! 763 | 764 | Also the "Data Reader" subsection was moved from Primitives/Other 765 | section to IO section, where it belongs much better. 766 | 767 | Still to add: Several of the new functions in the 768 | clojure.core.reducers namespace. 769 | 770 | ---------------------------------------------------------------------- 771 | Feb 13, 2013 - Clojure 1.3 & 1.4, sheet v8 772 | 773 | Moved take-nth function from "Head-items" under "Seq in, Seq out" to 774 | "Get shorter", which is a more accurate category for it. 775 | 776 | Update link for binding forms / destructuring examples on clojure.org. 777 | 778 | Removed :static keyword from examples in Metadata section. It appears 779 | frequently in Clojure code, but it has no effect in the compiler any 780 | more, and is thus obsolete. 781 | 782 | For those variants of the cheatsheet that include tooltips with the 783 | ClojureDocs.org contents summary line, now also explicitly show the 784 | list of symbols that are "see also" on the ClojureDocs.org site, right 785 | in the tooltip. Before it only included the number of such symbols in 786 | the tooltip. 787 | 788 | Add clojure.tools.reader.edn/read and read-string to the IO section. 789 | clojure.core/read and read-string are still there, but have a big 790 | warning after them right on the cheatsheet. 791 | 792 | 793 | ---------------------------------------------------------------------- 794 | Oct 14, 2012 - Clojure 1.3 & 1.4, sheet v7 795 | 796 | Removed "1." from cheat sheet version number, in hopes of avoiding 797 | confusion with Clojure version numbers. The cheat sheet version 798 | number advances independently from Clojure version numbers. 799 | 800 | Added example literals for long ints in hex, octal, binary, and base 801 | 36. Also scientific notation for doubles. 802 | 803 | Changed category of with-decimal from BigInt to BigDecimal 804 | 805 | Added most clojure.walk functions to Collections/Generic ops section. 806 | 807 | Added more clojure.java.io functions to IO/Misc section. 808 | 809 | Created new section Macros/Debug for all macroexpand functions 810 | (formerly in Macros/Create). 811 | 812 | Added clojure.java.browse/browse-url and clojure.java.shell/{sh, 813 | with-sh-dir, with-sh-env} to new section Other/Browser/Shell. 814 | 815 | ---------------------------------------------------------------------- 816 | Oct 8, 2012 - Clojure 1.3 & 1.4, sheet v1.6 817 | 818 | Added *unchecked-math* and the following symbols from Clojure 1.4, all 819 | marked with (1.4) on the sheet: 820 | 821 | Extensible data literals in reader: 822 | *data-readers*, default-data-readers 823 | 824 | New operations on vectors: 825 | mapv, filterv, reduce-kv 826 | 827 | Data-conveying exceptions: 828 | ex-data, ex-info 829 | 830 | Since ClojureDocs.org has no symbols new to Clojure 1.4 yet, all links 831 | for those symbols always go instead to the Clojure API documentation 832 | on Github. 833 | 834 | ---------------------------------------------------------------------- 835 | March 22, 2012 - Clojure 1.3.0, sheet v1.4 836 | 837 | Added (tutorial) entries in Namespace/Create and Loading/Load Libs 838 | sections that link to this nice article: 839 | http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html 840 | 841 | Added links to more details on regular expressions in the 842 | Strings/Regex section: 843 | http://www.regular-expressions.info 844 | http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html 845 | 846 | Added to Strings section: java.lang.String (abbreviated String in PDF 847 | version to fit better) .indexOf .lastIndexOf, with links to 848 | java.lang.String doc page. 849 | 850 | Added to Collections/Lists and Vectors sections: .indexOf and 851 | .lastIndexOf, with links to similar methods documented for 852 | java.util.Vector. 853 | 854 | Changed heading Destructuring in Special Forms section to "Binding 855 | Forms / Destructuring", for people who might know it by one name but 856 | not the other. 857 | 858 | Added to Maps/Create: group-by 859 | Added to IO/from reader: read 860 | 861 | Added Numbers/Literals section with examples of literal syntax for 862 | BigInt, Ratio, and BigDecimal. 863 | 864 | Removed :doc from Metadata/Common section and added :const instead. 865 | Doc strings are more commonly handled with the normal way to put them 866 | in def or defn forms. 867 | 868 | ---------------------------------------------------------------------- 869 | 2012 Feb 23 - Clojure 1.3.0, sheet v1.3 870 | 871 | Added new section Destructuring, with a link to a page containing 872 | examples on clojure.org, and a list of the most commonly-used macros 873 | that allow destructuring to be used within them. 874 | 875 | Added biginteger, clojure.java.io/file and copy, and link to fs 876 | project on GitHub for file manipulation functions. 877 | 878 | Removed "Others" part of Metadata section. It contained too many 879 | rarely-used metadata keys that can better be described on the 880 | clojure.org/special_forms web page linked to. 881 | 882 | Added more links to clojure.org, mostly in section titles. 883 | 884 | Moved take-last from subcategory Head-items to Tail-items in Seq 885 | in/Seq out section. 886 | 887 | Moved Zippers/Get zipper functions to Zippers/Create. 888 | 889 | Fix link to ->> in LaTeX so it works in generated PDF files. 890 | 891 | Many small tweaks to try to get it to almost fit in 2 pages with both 892 | US letter and A4 page sizes, but I think I'm giving up on that. It is 893 | 2+ sheets on paper, with room to grow. I used several more 894 | occurrences of common {pre, suf}fixes to try to get it down, and left 895 | those in. 896 | 897 | ---------------------------------------------------------------------- 898 | 2012 Feb 17 - Clojure 1.3.0, sheet v1.2 899 | 900 | Added / after all namespace symbols, plus a brief note about this 901 | notation, to be clearer to those new to Clojure. 902 | 903 | Improved formatting of some code snippets in Abstractions section. 904 | 905 | Made URL to clojure.org clickable, and added a few more of them. 906 | 907 | Fixed several typos: with-in-string -> with-in-str, Print/to string 908 | changed to IO/to string. 909 | 910 | Removed function sequence, which is rarely if ever used. seq is far 911 | more common and useful. 912 | 913 | ---------------------------------------------------------------------- 914 | 2012 Feb 16 - Clojure 1.3.0, sheet v1.1 915 | 916 | Primitives/Strings: Restructured to remove split between functions in 917 | clojure.core vs. clojure.string, added Regex functions (moved from 918 | where they used to be, way at the end in Other/Regex). 919 | 920 | Collections: Added examples of abbreviations like (my-vec idx) -> (nth 921 | my-vec idx), for vectors, maps, and sets. Combined subsections Sets 922 | and Sets (clojure.set). 923 | 924 | Removed StructMaps. 925 | 926 | Printing: Renamed IO, and significantly expanded its content. Moved 927 | what was in Other/IO here. I put in links to some Java 6 docs and a 928 | couple of binary I/O Clojure libraries on github. That might be going 929 | overboard. 930 | 931 | Multimethods: Renamed Abstractions, like in Fogus's ClojureScript 932 | cheatsheet, and pretty much copied what he had there (adjusting for 933 | slight ClojureScript and Clojure/JVM differences I know about, like 934 | . instead of .-) 935 | 936 | Reader Macros: Removed obsolete ^form -> (meta form). Changed #^ to ^ 937 | 938 | Metadata: Added new section with some details on metadata. 939 | 940 | Special Forms: No content changes, simply moved earlier to try to make 941 | things pack a little better in PDF version, which is just barely over 942 | 2 page now. 943 | 944 | ---------------------------------------------------------------------- 945 | 2012 Feb 15 - Clojure 1.3.0, sheet v1.0 946 | 947 | Minor clojure-cheatsheet-generator.clj script updates so it would run 948 | without errors or warnings with Clojure 1.3.0. 949 | 950 | Removals: 951 | 952 | replicate, because DEPRECATED. 953 | throw-if since it is declared private in clojure.core. It was in 1.2 954 | as well, but does it really belong in the cheatsheet? 955 | 956 | 957 | Additions of things new in Clojure 1.3.0: 958 | 959 | find-keyword to Other/Keywords 960 | realized? to Using a Seq/Check for forced evaluation 961 | every-pred and some-fn to Functions/Create 962 | with-redefs and with-redefs-fn to Macros/Scope 963 | clojure.repl/pst to Java Interoperation/Exceptions 964 | unchecked-{add,dec,divide,inc,multiply,negate,remainder,subtract}-int to Numbers/Unchecked. Space is a bit tight in that column to also include the long versions. 965 | nthrest to Seq in, Seq out/Tail-items 966 | clojure.data/diff to Misc/Compare 967 | clojure.java.javadoc/javadoc to Documentation/clojure.repl (I know, it is not really in clojure.repl -- space is getting tight in that column) 968 | clojure.pprint/pprint and print-table to Printing/Print to *out* 969 | 970 | 971 | Additions of things that existed before Clojure 1.3.0: 972 | 973 | compare to several places that seem appropriate: 974 | Seq in, Seq out/Rearrange, after sort-by 975 | Numbers/Compare 976 | Strings/Use 977 | Misc/Compare 978 | flatten to Seq in, Seq out/'Change' 979 | fnil to Functions/Create 980 | instance? to Misc/Test 981 | 982 | 983 | Moved: 984 | 985 | doc and find-doc to Documentation/clojure.repl, since they moved from 986 | clojure.core in 1.2.x to clojure.repl in 1.3.0. 987 | 988 | ---------------------------------------------------------------------- 989 | 2011 Sep 05 990 | 991 | Changes in cheatsheet version 2.0 from the cheatsheet version 992 | published at http://clojure.org/cheatsheet as of Sep 5, 2011: 993 | 994 | Additions: 995 | 996 | Collections/Sets: sorted-set-by 997 | Macros/Branch: case 998 | 999 | Removals: 1000 | 1001 | Removed contains? from Collections/Collections/Content tests, but 1002 | remains in Collections/Maps. Its appearance in the former category is 1003 | potentially misleading as to its behavior. Suggested by Stuart 1004 | Sierra. 1005 | 1006 | Removed Transients/Change and Transients/Iteration categories, since 1007 | those functions did not work on transients. All of the functions that 1008 | were there also appear elsewhere in more appropriate categories of the 1009 | cheatsheet. Renamed Transients/Use to Transients/Change. 1010 | 1011 | Removed nthrest and rfirst, which had no links to any documentation. 1012 | I believe they existed in a version of Clojure before 1.2, but were 1013 | removed by version 1.2 or earlier. 1014 | 1015 | Minor: 1016 | 1017 | HTML uses < > = ! instead of codes like %3C %3E etc. 1018 | 1019 | Some reordering of lists of functions referring to types like byte, 1020 | short, int, long. 1021 | -------------------------------------------------------------------------------- /src/clj-jvm/cheatsheet_files/jquery.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v1.7.2 jquery.com | jquery.org/license */ 2 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
"+""+"
",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
t
",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( 3 | a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f 4 | .clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); --------------------------------------------------------------------------------