showoffer 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
- data/README.rdoc +559 -0
- data/Rakefile +27 -0
- data/bin/showoffer +189 -0
- data/lib/commandline_parser.rb +67 -0
- data/lib/showoff.rb +515 -0
- data/lib/showoff/version.rb +3 -0
- data/lib/showoff_utils.rb +360 -0
- data/public/css/960.css +653 -0
- data/public/css/fg.menu.css +114 -0
- data/public/css/onepage.css +60 -0
- data/public/css/pdf.css +12 -0
- data/public/css/presenter.css +76 -0
- data/public/css/reset.css +53 -0
- data/public/css/sh_style.css +66 -0
- data/public/css/showoff.css +403 -0
- data/public/css/spinner_bar.gif +0 -0
- data/public/css/theme/images/ui-bg_diagonals-small_100_f0efea_40x40.png +0 -0
- data/public/css/theme/images/ui-bg_flat_35_f0f0f0_40x100.png +0 -0
- data/public/css/theme/images/ui-bg_glass_55_fcf0ba_1x400.png +0 -0
- data/public/css/theme/images/ui-bg_glow-ball_25_2e2e28_600x600.png +0 -0
- data/public/css/theme/images/ui-bg_highlight-soft_100_f0efea_1x100.png +0 -0
- data/public/css/theme/images/ui-bg_highlight-soft_25_327E04_1x100.png +0 -0
- data/public/css/theme/images/ui-bg_highlight-soft_25_5A9D1A_1x100.png +0 -0
- data/public/css/theme/images/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
- data/public/css/theme/images/ui-bg_inset-soft_22_3b3b35_1x100.png +0 -0
- data/public/css/theme/images/ui-icons_808080_256x240.png +0 -0
- data/public/css/theme/images/ui-icons_8DC262_256x240.png +0 -0
- data/public/css/theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/css/theme/images/ui-icons_e7e6e4_256x240.png +0 -0
- data/public/css/theme/images/ui-icons_eeeeee_256x240.png +0 -0
- data/public/css/theme/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/css/theme/ui.accordion.css +9 -0
- data/public/css/theme/ui.all.css +2 -0
- data/public/css/theme/ui.base.css +9 -0
- data/public/css/theme/ui.core.css +37 -0
- data/public/css/theme/ui.datepicker.css +62 -0
- data/public/css/theme/ui.dialog.css +13 -0
- data/public/css/theme/ui.progressbar.css +4 -0
- data/public/css/theme/ui.resizable.css +13 -0
- data/public/css/theme/ui.slider.css +17 -0
- data/public/css/theme/ui.tabs.css +9 -0
- data/public/css/theme/ui.theme.css +245 -0
- data/public/favicon.ico +0 -0
- data/public/highlight/AUTHORS.en.txt +46 -0
- data/public/highlight/AUTHORS.ru.txt +46 -0
- data/public/highlight/LICENSE +24 -0
- data/public/highlight/README.md +136 -0
- data/public/highlight/README.ru.md +140 -0
- data/public/highlight/classref.txt +437 -0
- data/public/highlight/export.html +87 -0
- data/public/highlight/highlight.js +630 -0
- data/public/highlight/highlight.pack.js +1 -0
- data/public/highlight/languages/1c.js +68 -0
- data/public/highlight/languages/apache.js +432 -0
- data/public/highlight/languages/avrasm.js +75 -0
- data/public/highlight/languages/axapta.js +43 -0
- data/public/highlight/languages/bash.js +56 -0
- data/public/highlight/languages/cmake.js +24 -0
- data/public/highlight/languages/cpp.js +62 -0
- data/public/highlight/languages/cs.js +41 -0
- data/public/highlight/languages/css.js +101 -0
- data/public/highlight/languages/delphi.js +70 -0
- data/public/highlight/languages/diff.js +64 -0
- data/public/highlight/languages/django.js +72 -0
- data/public/highlight/languages/dos.js +29 -0
- data/public/highlight/languages/erlang-repl.js +81 -0
- data/public/highlight/languages/erlang.js +201 -0
- data/public/highlight/languages/go.js +58 -0
- data/public/highlight/languages/haskell.js +77 -0
- data/public/highlight/languages/ini.js +32 -0
- data/public/highlight/languages/java.js +45 -0
- data/public/highlight/languages/javascript.js +53 -0
- data/public/highlight/languages/lisp.js +87 -0
- data/public/highlight/languages/lua.js +75 -0
- data/public/highlight/languages/mel.js +40 -0
- data/public/highlight/languages/nginx.js +224 -0
- data/public/highlight/languages/objectivec.js +94 -0
- data/public/highlight/languages/parser3.js +52 -0
- data/public/highlight/languages/perl.js +143 -0
- data/public/highlight/languages/php.js +55 -0
- data/public/highlight/languages/profile.js +49 -0
- data/public/highlight/languages/python.js +71 -0
- data/public/highlight/languages/renderman.js +230 -0
- data/public/highlight/languages/ruby.js +203 -0
- data/public/highlight/languages/scala.js +60 -0
- data/public/highlight/languages/smalltalk.js +55 -0
- data/public/highlight/languages/sql.js +90 -0
- data/public/highlight/languages/tex.js +62 -0
- data/public/highlight/languages/vala.js +75 -0
- data/public/highlight/languages/vbscript.js +30 -0
- data/public/highlight/languages/vhdl.js +30 -0
- data/public/highlight/languages/xml.js +103 -0
- data/public/highlight/styles/arta.css +151 -0
- data/public/highlight/styles/ascetic.css +45 -0
- data/public/highlight/styles/brown_paper.css +105 -0
- data/public/highlight/styles/brown_papersq.png +0 -0
- data/public/highlight/styles/dark.css +103 -0
- data/public/highlight/styles/default.css +121 -0
- data/public/highlight/styles/far.css +118 -0
- data/public/highlight/styles/github.css +129 -0
- data/public/highlight/styles/idea.css +118 -0
- data/public/highlight/styles/ir_black.css +103 -0
- data/public/highlight/styles/magula.css +118 -0
- data/public/highlight/styles/school_book.css +111 -0
- data/public/highlight/styles/school_book.png +0 -0
- data/public/highlight/styles/solarized_dark.css +96 -0
- data/public/highlight/styles/solarized_light.css +96 -0
- data/public/highlight/styles/sunburst.css +147 -0
- data/public/highlight/styles/vs.css +84 -0
- data/public/highlight/styles/zenburn.css +115 -0
- data/public/highlight/test.html +1609 -0
- data/public/js/coffee-script.js +8 -0
- data/public/js/core.js +79 -0
- data/public/js/fg.menu.js +645 -0
- data/public/js/jTypeWriter.js +26 -0
- data/public/js/jquery-1.4.2.min.js +154 -0
- data/public/js/jquery-print.js +109 -0
- data/public/js/jquery.batchImageLoad.js +56 -0
- data/public/js/jquery.cookie.js +96 -0
- data/public/js/jquery.cycle.all.js +1284 -0
- data/public/js/jquery.doubletap-0.1.js +105 -0
- data/public/js/jquery.uuid.js +24 -0
- data/public/js/jquery.ws-0.3pre.js +201 -0
- data/public/js/onepage.js +5 -0
- data/public/js/presenter.js +193 -0
- data/public/js/sh_lang/sh_bison.min.js +1 -0
- data/public/js/sh_lang/sh_c.min.js +1 -0
- data/public/js/sh_lang/sh_caml.min.js +1 -0
- data/public/js/sh_lang/sh_changelog.min.js +1 -0
- data/public/js/sh_lang/sh_coffeescript.min.js +1 -0
- data/public/js/sh_lang/sh_cpp.min.js +1 -0
- data/public/js/sh_lang/sh_csharp.min.js +1 -0
- data/public/js/sh_lang/sh_css.min.js +1 -0
- data/public/js/sh_lang/sh_cucumber.min.js +2 -0
- data/public/js/sh_lang/sh_desktop.min.js +1 -0
- data/public/js/sh_lang/sh_diff.min.js +1 -0
- data/public/js/sh_lang/sh_erlang.min.js +1 -0
- data/public/js/sh_lang/sh_flex.min.js +1 -0
- data/public/js/sh_lang/sh_glsl.min.js +1 -0
- data/public/js/sh_lang/sh_haxe.min.js +1 -0
- data/public/js/sh_lang/sh_html.min.js +1 -0
- data/public/js/sh_lang/sh_java.min.js +1 -0
- data/public/js/sh_lang/sh_javascript.min.js +1 -0
- data/public/js/sh_lang/sh_javascript_dom.min.js +1 -0
- data/public/js/sh_lang/sh_latex.min.js +1 -0
- data/public/js/sh_lang/sh_ldap.min.js +1 -0
- data/public/js/sh_lang/sh_log.min.js +1 -0
- data/public/js/sh_lang/sh_lsm.min.js +1 -0
- data/public/js/sh_lang/sh_m4.min.js +1 -0
- data/public/js/sh_lang/sh_makefile.min.js +1 -0
- data/public/js/sh_lang/sh_oracle.min.js +1 -0
- data/public/js/sh_lang/sh_pascal.min.js +1 -0
- data/public/js/sh_lang/sh_perl.min.js +1 -0
- data/public/js/sh_lang/sh_php.min.js +1 -0
- data/public/js/sh_lang/sh_prolog.min.js +1 -0
- data/public/js/sh_lang/sh_properties.min.js +1 -0
- data/public/js/sh_lang/sh_python.min.js +1 -0
- data/public/js/sh_lang/sh_ruby.min.js +1 -0
- data/public/js/sh_lang/sh_scala.min.js +1 -0
- data/public/js/sh_lang/sh_sh.min.js +1 -0
- data/public/js/sh_lang/sh_slang.min.js +1 -0
- data/public/js/sh_lang/sh_sml.min.js +1 -0
- data/public/js/sh_lang/sh_spec.min.js +1 -0
- data/public/js/sh_lang/sh_sql.min.js +1 -0
- data/public/js/sh_lang/sh_tcl.min.js +1 -0
- data/public/js/sh_lang/sh_xml.min.js +1 -0
- data/public/js/sh_lang/sh_xorg.min.js +1 -0
- data/public/js/sh_main.min.js +4 -0
- data/public/js/showoff.js +652 -0
- data/public/js/showoffcore.js +13 -0
- data/public/scripts/script.js +280 -0
- data/public/themes/ribbon/fonts/DroidSansMono.svg +626 -0
- data/public/themes/ribbon/fonts/DroidSansMono.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.Italic.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.Italic.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.Italic.woff +0 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Bold.woff +0 -0
- data/public/themes/ribbon/fonts/PTSans.Italic.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.Italic.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Italic.woff +0 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.Bold.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.Bold.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.Bold.woff +0 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.Narrow.woff +0 -0
- data/public/themes/ribbon/fonts/PTSans.svg +728 -0
- data/public/themes/ribbon/fonts/PTSans.ttf +0 -0
- data/public/themes/ribbon/fonts/PTSans.woff +0 -0
- data/public/themes/ribbon/fonts/TargetBlank.otf +0 -0
- data/public/themes/ribbon/fonts/TargetBlank.svg +14 -0
- data/public/themes/ribbon/images/grid.png +0 -0
- data/public/themes/ribbon/images/linen.png +0 -0
- data/public/themes/ribbon/images/ribbon.svg +4 -0
- data/public/themes/ribbon/styles/fonts.css +63 -0
- data/public/themes/ribbon/styles/print.css +68 -0
- data/public/themes/ribbon/styles/reset.css +42 -0
- data/public/themes/ribbon/styles/style.css +408 -0
- data/views/header.erb +11 -0
- data/views/index.erb +13 -0
- data/views/onepage.erb +39 -0
- data/views/presenter.erb +70 -0
- metadata +328 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>
|
|
4
|
+
|
|
5
|
+
*/
|
|
6
|
+
pre code {
|
|
7
|
+
display: block; padding: 0.5em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
pre .comment,
|
|
11
|
+
pre .annotation,
|
|
12
|
+
pre .template_comment,
|
|
13
|
+
pre .diff .header,
|
|
14
|
+
pre .chunk,
|
|
15
|
+
pre .apache .cbracket {
|
|
16
|
+
color: rgb(0, 128, 0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
pre .keyword,
|
|
20
|
+
pre .id,
|
|
21
|
+
pre .title,
|
|
22
|
+
pre .built_in,
|
|
23
|
+
pre .aggregate,
|
|
24
|
+
pre .smalltalk .class,
|
|
25
|
+
pre .winutils,
|
|
26
|
+
pre .bash .variable,
|
|
27
|
+
pre .tex .command {
|
|
28
|
+
color: rgb(0, 0, 255);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
pre .string,
|
|
32
|
+
pre .title,
|
|
33
|
+
pre .parent,
|
|
34
|
+
pre .tag .value,
|
|
35
|
+
pre .rules .value,
|
|
36
|
+
pre .rules .value .number,
|
|
37
|
+
pre .ruby .symbol,
|
|
38
|
+
pre .ruby .symbol .string,
|
|
39
|
+
pre .ruby .symbol .keyword,
|
|
40
|
+
pre .ruby .symbol .keymethods,
|
|
41
|
+
pre .instancevar,
|
|
42
|
+
pre .aggregate,
|
|
43
|
+
pre .template_tag,
|
|
44
|
+
pre .django .variable,
|
|
45
|
+
pre .addition,
|
|
46
|
+
pre .flow,
|
|
47
|
+
pre .stream,
|
|
48
|
+
pre .apache .tag,
|
|
49
|
+
pre .date,
|
|
50
|
+
pre .tex .formula {
|
|
51
|
+
color: rgb(163, 21, 21);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
pre .ruby .string,
|
|
55
|
+
pre .decorator,
|
|
56
|
+
pre .filter .argument,
|
|
57
|
+
pre .localvars,
|
|
58
|
+
pre .array,
|
|
59
|
+
pre .attr_selector,
|
|
60
|
+
pre .pseudo,
|
|
61
|
+
pre .pi,
|
|
62
|
+
pre .doctype,
|
|
63
|
+
pre .deletion,
|
|
64
|
+
pre .envvar,
|
|
65
|
+
pre .shebang,
|
|
66
|
+
pre .preprocessor,
|
|
67
|
+
pre .userType,
|
|
68
|
+
pre .apache .sqbracket,
|
|
69
|
+
pre .nginx .built_in,
|
|
70
|
+
pre .tex .special,
|
|
71
|
+
pre .input_number {
|
|
72
|
+
color: rgb(43, 145, 175);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
pre .phpdoc,
|
|
76
|
+
pre .javadoc,
|
|
77
|
+
pre .xmlDocTag {
|
|
78
|
+
color: rgb(128, 128, 128);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
pre .vhdl .type { font-weight: bold; }
|
|
82
|
+
pre .vhdl .string { color: #666666; }
|
|
83
|
+
pre .vhdl .literal { color: rgb(163, 21, 21); }
|
|
84
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
|
|
4
|
+
based on dark.css by Ivan Sagalaev
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
pre code {
|
|
9
|
+
display: block; padding: 0.5em;
|
|
10
|
+
background: #3F3F3F;
|
|
11
|
+
color: #DCDCDC;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
pre .keyword,
|
|
15
|
+
pre .tag,
|
|
16
|
+
pre .django .tag,
|
|
17
|
+
pre .django .keyword,
|
|
18
|
+
pre .css .class,
|
|
19
|
+
pre .css .id,
|
|
20
|
+
pre .lisp .title {
|
|
21
|
+
color: #E3CEAB;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
pre .django .template_tag,
|
|
25
|
+
pre .django .variable,
|
|
26
|
+
pre .django .filter .argument {
|
|
27
|
+
color: #DCDCDC;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
pre .number,
|
|
31
|
+
pre .date {
|
|
32
|
+
color: #8CD0D3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
pre .dos .envvar,
|
|
36
|
+
pre .dos .stream,
|
|
37
|
+
pre .variable,
|
|
38
|
+
pre .apache .sqbracket {
|
|
39
|
+
color: #EFDCBC;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
pre .dos .flow,
|
|
43
|
+
pre .diff .change,
|
|
44
|
+
pre .python .exception,
|
|
45
|
+
pre .python .built_in,
|
|
46
|
+
pre .literal,
|
|
47
|
+
pre .tex .special {
|
|
48
|
+
color: #EFEFAF;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
pre .diff .chunk,
|
|
52
|
+
pre .ruby .subst {
|
|
53
|
+
color: #8F8F8F;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
pre .dos .keyword,
|
|
57
|
+
pre .python .decorator,
|
|
58
|
+
pre .class .title,
|
|
59
|
+
pre .haskell .label,
|
|
60
|
+
pre .function .title,
|
|
61
|
+
pre .ini .title,
|
|
62
|
+
pre .diff .header,
|
|
63
|
+
pre .ruby .class .parent,
|
|
64
|
+
pre .apache .tag,
|
|
65
|
+
pre .nginx .built_in,
|
|
66
|
+
pre .tex .command,
|
|
67
|
+
pre .input_number {
|
|
68
|
+
color: #efef8f;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
pre .dos .winutils,
|
|
72
|
+
pre .ruby .symbol,
|
|
73
|
+
pre .ruby .symbol .string,
|
|
74
|
+
pre .ruby .symbol .keyword,
|
|
75
|
+
pre .ruby .symbol .keymethods,
|
|
76
|
+
pre .ruby .string,
|
|
77
|
+
pre .ruby .instancevar {
|
|
78
|
+
color: #DCA3A3;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
pre .diff .deletion,
|
|
82
|
+
pre .string,
|
|
83
|
+
pre .tag .value,
|
|
84
|
+
pre .preprocessor,
|
|
85
|
+
pre .built_in,
|
|
86
|
+
pre .sql .aggregate,
|
|
87
|
+
pre .javadoc,
|
|
88
|
+
pre .smalltalk .class,
|
|
89
|
+
pre .smalltalk .localvars,
|
|
90
|
+
pre .smalltalk .array,
|
|
91
|
+
pre .css .rules .value,
|
|
92
|
+
pre .attr_selector,
|
|
93
|
+
pre .pseudo,
|
|
94
|
+
pre .apache .cbracket,
|
|
95
|
+
pre .tex .formula {
|
|
96
|
+
color: #CC9393;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pre .shebang,
|
|
100
|
+
pre .diff .addition,
|
|
101
|
+
pre .comment,
|
|
102
|
+
pre .java .annotation,
|
|
103
|
+
pre .template_comment,
|
|
104
|
+
pre .pi,
|
|
105
|
+
pre .doctype {
|
|
106
|
+
color: #7F9F7F;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
pre .xml .css,
|
|
110
|
+
pre .xml .javascript,
|
|
111
|
+
pre .xml .vbscript,
|
|
112
|
+
pre .tex .formula {
|
|
113
|
+
opacity: 0.5;
|
|
114
|
+
}
|
|
115
|
+
|
|
@@ -0,0 +1,1609 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>highlight.js test</title>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
|
|
6
|
+
<link rel="stylesheet" title="Default" href="styles/default.css">
|
|
7
|
+
<link rel="alternate stylesheet" title="Dark" href="styles/dark.css">
|
|
8
|
+
<link rel="alternate stylesheet" title="FAR" href="styles/far.css">
|
|
9
|
+
<link rel="alternate stylesheet" title="IDEA" href="styles/idea.css">
|
|
10
|
+
<link rel="alternate stylesheet" title="Sunburst" href="styles/sunburst.css">
|
|
11
|
+
<link rel="alternate stylesheet" title="Zenburn" href="styles/zenburn.css">
|
|
12
|
+
<link rel="alternate stylesheet" title="Visual Studio" href="styles/vs.css">
|
|
13
|
+
<link rel="alternate stylesheet" title="Ascetic" href="styles/ascetic.css">
|
|
14
|
+
<link rel="alternate stylesheet" title="Magula" href="styles/magula.css">
|
|
15
|
+
<link rel="alternate stylesheet" title="GitHub" href="styles/github.css">
|
|
16
|
+
<link rel="alternate stylesheet" title="Brown Paper" href="styles/brown_paper.css">
|
|
17
|
+
<link rel="alternate stylesheet" title="School Book" href="styles/school_book.css">
|
|
18
|
+
<link rel="alternate stylesheet" title="IR Black" href="styles/ir_black.css">
|
|
19
|
+
<link rel="alternate stylesheet" title="Solarized - Dark" href="styles/solarized_dark.css">
|
|
20
|
+
<link rel="alternate stylesheet" title="Solarized - Light" href="styles/solarized_light.css">
|
|
21
|
+
<link rel="alternate stylesheet" title="Arta" href="styles/arta.css">
|
|
22
|
+
|
|
23
|
+
<style>
|
|
24
|
+
body {
|
|
25
|
+
font: small Arial, sans-serif;
|
|
26
|
+
}
|
|
27
|
+
h2 {
|
|
28
|
+
font: bold 100% Arial, sans-serif;
|
|
29
|
+
margin-top: 2em;
|
|
30
|
+
margin-bottom: 0.5em;
|
|
31
|
+
}
|
|
32
|
+
table {
|
|
33
|
+
width: 100%; padding: 0; border-collapse: collapse;
|
|
34
|
+
}
|
|
35
|
+
th {
|
|
36
|
+
width: 12em;
|
|
37
|
+
padding: 0; margin: 0;
|
|
38
|
+
}
|
|
39
|
+
td {
|
|
40
|
+
padding-bottom: 1em;
|
|
41
|
+
}
|
|
42
|
+
td, th {
|
|
43
|
+
vertical-align: top;
|
|
44
|
+
text-align: left;
|
|
45
|
+
}
|
|
46
|
+
pre {
|
|
47
|
+
margin: 0; font-size: medium;
|
|
48
|
+
}
|
|
49
|
+
#switch {
|
|
50
|
+
overflow: auto; width: 57em;
|
|
51
|
+
list-style: none;
|
|
52
|
+
padding: 0; margin: 0;
|
|
53
|
+
}
|
|
54
|
+
#switch li {
|
|
55
|
+
float: left; width: 10em;
|
|
56
|
+
padding: 0.1em; margin: 0.1em 1em 0.1em 0;
|
|
57
|
+
background: #EEE;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
#switch li.current {
|
|
61
|
+
background: #CCC;
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
}
|
|
64
|
+
.test {
|
|
65
|
+
color: #888;
|
|
66
|
+
font-weight: normal;
|
|
67
|
+
margin: 2em 0 0 0;
|
|
68
|
+
}
|
|
69
|
+
.test var {
|
|
70
|
+
font-style: normal;
|
|
71
|
+
}
|
|
72
|
+
.passed {
|
|
73
|
+
color: green;
|
|
74
|
+
}
|
|
75
|
+
.failed {
|
|
76
|
+
color: red;
|
|
77
|
+
}
|
|
78
|
+
.code {
|
|
79
|
+
font: medium monospace;
|
|
80
|
+
}
|
|
81
|
+
.code .keyword {
|
|
82
|
+
font-weight: bold;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
85
|
+
|
|
86
|
+
<script src="highlight.pack.js"></script>
|
|
87
|
+
<script>
|
|
88
|
+
hljs.tabReplace = ' ';
|
|
89
|
+
hljs.initHighlightingOnLoad();
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<script>
|
|
93
|
+
// Stylesheet switcher © Vladimir Epifanov <voldmar@voldmar.ru>
|
|
94
|
+
(function(container_id) {
|
|
95
|
+
if (window.addEventListener) {
|
|
96
|
+
var attach = function(el, ev, handler) {
|
|
97
|
+
el.addEventListener(ev, handler, false);
|
|
98
|
+
}
|
|
99
|
+
} else if (window.attachEvent) {
|
|
100
|
+
var attach = function(el, ev, handler) {
|
|
101
|
+
el.attachEvent('on' + ev, handler);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
var attach = function(el, ev, handler) {
|
|
105
|
+
ev['on' + ev] = handler;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
attach(window, 'load', function() {
|
|
111
|
+
var current = null;
|
|
112
|
+
|
|
113
|
+
var info = {};
|
|
114
|
+
var links = document.getElementsByTagName('link');
|
|
115
|
+
var ul = document.createElement('ul')
|
|
116
|
+
|
|
117
|
+
for (var i = 0; (link = links[i]); i++) {
|
|
118
|
+
if (link.getAttribute('rel').indexOf('style') != -1
|
|
119
|
+
&& link.title) {
|
|
120
|
+
|
|
121
|
+
var title = link.title;
|
|
122
|
+
|
|
123
|
+
info[title] = {
|
|
124
|
+
'link': link,
|
|
125
|
+
'li': document.createElement('li')
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
ul.appendChild(info[title].li)
|
|
129
|
+
info[title].li.title = title;
|
|
130
|
+
|
|
131
|
+
info[title].link.disabled = true;
|
|
132
|
+
|
|
133
|
+
info[title].li.appendChild(document.createTextNode(title));
|
|
134
|
+
attach(info[title].li, 'click', (function (el) {
|
|
135
|
+
return function() {
|
|
136
|
+
current.li.className = '';
|
|
137
|
+
current.link.disabled = true;
|
|
138
|
+
current = el;
|
|
139
|
+
current.li.className = 'current';
|
|
140
|
+
current.link.disabled = false;
|
|
141
|
+
}})(info[title]));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
current = info['Default']
|
|
146
|
+
current.li.className = 'current';
|
|
147
|
+
current.link.disabled = false;
|
|
148
|
+
|
|
149
|
+
ul.id = 'switch';
|
|
150
|
+
container = document.getElementById(container_id);
|
|
151
|
+
container.appendChild(ul);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
})('styleswitcher');
|
|
155
|
+
</script>
|
|
156
|
+
<body>
|
|
157
|
+
|
|
158
|
+
<p>This is a demo/test page showing all languages supported by <a href="http://softwaremaniacs.org/soft/highlight/en/">highlight.js</a>.
|
|
159
|
+
Most snippets do not contain working code :-).
|
|
160
|
+
|
|
161
|
+
<div id="styleswitcher">
|
|
162
|
+
<h2>Styles</h2>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<h2>Automatically detected languages</h2>
|
|
166
|
+
|
|
167
|
+
<p id="summary">...</p>
|
|
168
|
+
<table id="autotest">
|
|
169
|
+
<tr>
|
|
170
|
+
<th>Python
|
|
171
|
+
<td class="python">
|
|
172
|
+
<pre>
|
|
173
|
+
<code>@requires_authorization
|
|
174
|
+
def somefunc(param1, param2):
|
|
175
|
+
r'''A docstring'''
|
|
176
|
+
if param1 > param2: # interesting
|
|
177
|
+
print 'Gre\'ater'
|
|
178
|
+
print ''
|
|
179
|
+
return (param2 - param1 + 1) or None
|
|
180
|
+
|
|
181
|
+
class SomeClass:<br> pass
|
|
182
|
+
</code></pre>
|
|
183
|
+
|
|
184
|
+
<tr>
|
|
185
|
+
<th>Python's profiler output
|
|
186
|
+
<td class="profile">
|
|
187
|
+
<pre><code> 261917242 function calls in 686.251 CPU seconds
|
|
188
|
+
|
|
189
|
+
ncalls tottime filename:lineno(function)
|
|
190
|
+
152824 513.894 {method 'sort' of 'list' objects}
|
|
191
|
+
129590630 83.894 rrule.py:842(__cmp__)
|
|
192
|
+
129590630 82.439 {cmp}
|
|
193
|
+
153900 1.296 rrule.py:399(_iter)
|
|
194
|
+
304393/151570 0.963 rrule.py:102(_iter_cached)
|
|
195
|
+
</code></pre>
|
|
196
|
+
|
|
197
|
+
<tr>
|
|
198
|
+
<th>Ruby
|
|
199
|
+
<td class="ruby">
|
|
200
|
+
<pre><code>class A < B; def self.create(object = User) object end end
|
|
201
|
+
class Zebra; def inspect; "X#{2 + self.object_id}" end end
|
|
202
|
+
|
|
203
|
+
module ABC::DEF
|
|
204
|
+
include Comparable
|
|
205
|
+
|
|
206
|
+
# @param test
|
|
207
|
+
# @return [String] nothing
|
|
208
|
+
def foo(test)
|
|
209
|
+
Thread.new do |blockvar|
|
|
210
|
+
ABC::DEF.reverse(:a_symbol, :'a symbol' + 'test' + test)
|
|
211
|
+
end.join
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
def [](index) self[index] end
|
|
215
|
+
def ==(other) other == self end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
anIdentifier = an_identifier
|
|
219
|
+
Constant = 1
|
|
220
|
+
</code></pre>
|
|
221
|
+
|
|
222
|
+
<tr>
|
|
223
|
+
<th>Perl
|
|
224
|
+
<td class="perl">
|
|
225
|
+
<pre><code># loads object
|
|
226
|
+
sub load
|
|
227
|
+
{
|
|
228
|
+
my $flds = $c->db_load($id,@_) || do {
|
|
229
|
+
Carp::carp "Can`t load (class: $c, id: $id): '$!'"; return undef
|
|
230
|
+
};
|
|
231
|
+
my $o = $c->_perl_new();
|
|
232
|
+
$id12 = $id;
|
|
233
|
+
$o->{'ID'} = $id12 + 123;
|
|
234
|
+
$o->{'PAPA'} = $flds->{'PAPA'};
|
|
235
|
+
#$o->{'SHCUT'} = $flds->{'SHCUT'};
|
|
236
|
+
my $p = $o->props;
|
|
237
|
+
my $vt;
|
|
238
|
+
$string =~ m/^sought_text$/;
|
|
239
|
+
for my $key (keys %$p)
|
|
240
|
+
{
|
|
241
|
+
if(${$vt.'::property'}) {
|
|
242
|
+
$o->{$key . '_real'} = $flds->{$key};
|
|
243
|
+
tie $o->{$key}, 'CMSBuilder::Property', $o, $key;
|
|
244
|
+
} else {
|
|
245
|
+
$o->{$key} = $flds->{$key};
|
|
246
|
+
$o->kill();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
$o->save if delete $o->{'_save_after_load'};
|
|
250
|
+
return $o;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
foreach my $num (0..$#array) {
|
|
254
|
+
# something
|
|
255
|
+
}
|
|
256
|
+
</code></pre>
|
|
257
|
+
|
|
258
|
+
<tr>
|
|
259
|
+
<th>PHP
|
|
260
|
+
<td class="php">
|
|
261
|
+
<pre><code>require_once 'Zend.php';
|
|
262
|
+
require_once 'Zend/Uri/Exception.php';
|
|
263
|
+
require_once 'Zend/Uri/Http.php';
|
|
264
|
+
require_once 'Zend/Uri/Mailto.php';
|
|
265
|
+
|
|
266
|
+
abstract class Zend_Uri
|
|
267
|
+
{
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Return a string representation of this URI.
|
|
271
|
+
*
|
|
272
|
+
* @see getUri()
|
|
273
|
+
* @return string
|
|
274
|
+
*/
|
|
275
|
+
public function __toString()
|
|
276
|
+
{
|
|
277
|
+
return $this->getUri();
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
static public function factory($uri = 'http')
|
|
281
|
+
{
|
|
282
|
+
$uri = explode(':', $uri, 2);
|
|
283
|
+
$scheme = strtolower($uri[0]);
|
|
284
|
+
$schemeSpecific = isset($uri[1]) ? $uri[1] : '';
|
|
285
|
+
|
|
286
|
+
// Security check: $scheme is used to load a class file,
|
|
287
|
+
// so only alphanumerics are allowed.
|
|
288
|
+
if (!ctype_alnum($scheme)) {
|
|
289
|
+
throw new Zend_Uri_Exception('Illegal scheme');
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
</code></pre>
|
|
294
|
+
|
|
295
|
+
<tr>
|
|
296
|
+
<th>Scala
|
|
297
|
+
<td class="scala">
|
|
298
|
+
<pre><code>object abstractTypes extends Application {
|
|
299
|
+
abstract class SeqBuffer {
|
|
300
|
+
type T; val element: Seq[T]; def length = element.length
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** Turn command line arguments to uppercase */
|
|
305
|
+
object Main {
|
|
306
|
+
def main(args: Array[String]) {
|
|
307
|
+
val res = for (a <- args) yield a.toUpperCase
|
|
308
|
+
println("Arguments: " + res.toString)
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/** Maps are easy to use in Scala. */
|
|
313
|
+
object Maps {
|
|
314
|
+
val colors = Map("red" -> 0xFF0000,
|
|
315
|
+
"turquoise" -> 0x00FFFF,
|
|
316
|
+
"black" -> 0x000000,
|
|
317
|
+
"orange" -> 0xFF8040,
|
|
318
|
+
"brown" -> 0x804000)
|
|
319
|
+
def main(args: Array[String]) {
|
|
320
|
+
for (name <- args) println(
|
|
321
|
+
colors.get(name) match {
|
|
322
|
+
case Some(code) =>
|
|
323
|
+
name + " has code: " + code
|
|
324
|
+
case None =>
|
|
325
|
+
"Unknown color: " + name
|
|
326
|
+
}
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
</code></pre>
|
|
331
|
+
|
|
332
|
+
<tr>
|
|
333
|
+
<th>Go
|
|
334
|
+
<td class="go">
|
|
335
|
+
<pre><code>package main
|
|
336
|
+
|
|
337
|
+
import (
|
|
338
|
+
"fmt"
|
|
339
|
+
"rand"
|
|
340
|
+
"os"
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
const (
|
|
344
|
+
Sunday = iota
|
|
345
|
+
Partyday
|
|
346
|
+
numberOfDays // this constant is not exported
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
type Foo interface {
|
|
350
|
+
FooFunc(int, float32) (complex128, []int)
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// simple comment
|
|
354
|
+
type Bar struct {
|
|
355
|
+
os.File /* multi
|
|
356
|
+
line
|
|
357
|
+
comment */
|
|
358
|
+
|
|
359
|
+
PublicData chan int
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
func main() {
|
|
363
|
+
ch := make(chan int)
|
|
364
|
+
ch <- 1
|
|
365
|
+
x, ok := <- ch
|
|
366
|
+
ok = true
|
|
367
|
+
x = nil
|
|
368
|
+
float_var := 1.0e10
|
|
369
|
+
defer fmt.Println('exitting \' now')
|
|
370
|
+
defer fmt.Println(`exitting \` now`)
|
|
371
|
+
var fv1 float64 = 0.75
|
|
372
|
+
go println(len("hello world!"))
|
|
373
|
+
return
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
</code></pre>
|
|
377
|
+
|
|
378
|
+
<tr>
|
|
379
|
+
<th>XML
|
|
380
|
+
<td class="xml">
|
|
381
|
+
<pre><code><?xml version="1.0"?>
|
|
382
|
+
<response value="ok" xml:lang="en">
|
|
383
|
+
<text>Ok</text>
|
|
384
|
+
<comment html_allowed="true"/>
|
|
385
|
+
<ns1:description><![CDATA[
|
|
386
|
+
CDATA is <not> magical.
|
|
387
|
+
]]></ns1:description>
|
|
388
|
+
<a></a> <a/>
|
|
389
|
+
</response>
|
|
390
|
+
</code></pre>
|
|
391
|
+
|
|
392
|
+
<tr>
|
|
393
|
+
<th>HTML (with inline css and javascript)
|
|
394
|
+
<td class="xml">
|
|
395
|
+
<pre><code><!DOCTYPE html5>
|
|
396
|
+
<head>
|
|
397
|
+
<title>Title</title>
|
|
398
|
+
|
|
399
|
+
<style>
|
|
400
|
+
body {
|
|
401
|
+
width: 500px;
|
|
402
|
+
}
|
|
403
|
+
</style>
|
|
404
|
+
|
|
405
|
+
<script type="application/javascript">
|
|
406
|
+
function someFunction() {
|
|
407
|
+
return true;
|
|
408
|
+
}
|
|
409
|
+
</script>
|
|
410
|
+
|
|
411
|
+
<body>
|
|
412
|
+
<p class="something" id='12'>Something</p>
|
|
413
|
+
<p class=something>Something</p>
|
|
414
|
+
<!-- comment -->
|
|
415
|
+
<p class>Something</p>
|
|
416
|
+
<p class="something" title="p">Something</p>
|
|
417
|
+
</body>
|
|
418
|
+
</code></pre>
|
|
419
|
+
|
|
420
|
+
<tr>
|
|
421
|
+
<th>Django templates
|
|
422
|
+
<td class="django">
|
|
423
|
+
<pre><code>{% if articles|length %}
|
|
424
|
+
{% for article in articles %}
|
|
425
|
+
|
|
426
|
+
{# Striped table #}
|
|
427
|
+
<tr class="{% cycle odd,even %}">
|
|
428
|
+
<td>{{ article|default:"Hi... "|escape }}</td>
|
|
429
|
+
<td {% if article.today %}class="today"{% endif %}>{{ article.date|date:"d.m.Y" }}</td>
|
|
430
|
+
</tr>
|
|
431
|
+
|
|
432
|
+
{% endfor %}
|
|
433
|
+
{% endif %}
|
|
434
|
+
|
|
435
|
+
{% comment %}
|
|
436
|
+
Comments may be long and
|
|
437
|
+
multiline.
|
|
438
|
+
{% endcomment %}
|
|
439
|
+
</code></pre>
|
|
440
|
+
|
|
441
|
+
<tr>
|
|
442
|
+
<th>CSS
|
|
443
|
+
<td class="css">
|
|
444
|
+
<pre><code>body,
|
|
445
|
+
html {
|
|
446
|
+
font: Tahoma, Arial, san-serif;
|
|
447
|
+
background: url('hatch.png');
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
@import url('print.css');
|
|
451
|
+
|
|
452
|
+
@media screen and (-webkit-min-device-pixel-ratio: 0) {
|
|
453
|
+
body:first-of-type pre::after {
|
|
454
|
+
content: 'highlight: ' attr(class);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
@page:right {
|
|
459
|
+
margin: 1cm 2cm 1.3cm 4cm;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
@font-face {
|
|
463
|
+
font-family: Chunkfive;
|
|
464
|
+
src: url('Chunkfive.otf');
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
#content {
|
|
468
|
+
width: /* wide enough */ 100% /* 400px */;
|
|
469
|
+
height: 100%
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
p[lang=ru] {
|
|
473
|
+
color: #F0F0F0; background: white !important;
|
|
474
|
+
}
|
|
475
|
+
</code></pre>
|
|
476
|
+
|
|
477
|
+
<tr>
|
|
478
|
+
<th>Javascript
|
|
479
|
+
<td class="javascript">
|
|
480
|
+
<pre><code>function $initHighlight(block) {
|
|
481
|
+
if (block.className.search(/\bno\-highlight\b/) != -1)
|
|
482
|
+
return false;
|
|
483
|
+
try {
|
|
484
|
+
blockText(block);
|
|
485
|
+
} catch (e) {
|
|
486
|
+
if (e == 'Complex markup')
|
|
487
|
+
return;
|
|
488
|
+
}//try
|
|
489
|
+
var classes = block.className.split(/\s+/);
|
|
490
|
+
for (var i = 0 / 2; i < classes.length; i++) { // "0 / 2" should not be parsed as regexp start
|
|
491
|
+
if (LANGUAGES[classes[i]]) {
|
|
492
|
+
highlightLanguage(block, classes[i]);
|
|
493
|
+
return;
|
|
494
|
+
}//if
|
|
495
|
+
}//for
|
|
496
|
+
highlightAuto(block);
|
|
497
|
+
}//initHighlight</code></pre>
|
|
498
|
+
|
|
499
|
+
<tr>
|
|
500
|
+
<th>VBScript
|
|
501
|
+
<td class="vbscript">
|
|
502
|
+
<pre><code>' creating configuration storage and initializing with default values
|
|
503
|
+
Set cfg = CreateObject("Scripting.Dictionary")
|
|
504
|
+
|
|
505
|
+
' reading ini file
|
|
506
|
+
for i = 0 to ubound(ini_strings)
|
|
507
|
+
s = trim(ini_strings(i))
|
|
508
|
+
|
|
509
|
+
' skipping empty strings and comments
|
|
510
|
+
if mid(s, 1, 1) <> "#" and len(s) > 0 then
|
|
511
|
+
' obtaining key and value
|
|
512
|
+
parts = split(s, "=", -1, 1)
|
|
513
|
+
|
|
514
|
+
if ubound(parts)+1 = 2 then
|
|
515
|
+
parts(0) = trim(parts(0))
|
|
516
|
+
parts(1) = trim(parts(1))
|
|
517
|
+
|
|
518
|
+
' reading configuration and filenames
|
|
519
|
+
select case lcase(parts(0))
|
|
520
|
+
case "uncompressed""_postfix" cfg.item("uncompressed""_postfix") = parts(1)
|
|
521
|
+
case "f"
|
|
522
|
+
options = split(parts(1), "|", -1, 1)
|
|
523
|
+
if ubound(options)+1 = 2 then
|
|
524
|
+
' 0: filename, 1: options
|
|
525
|
+
ff.add trim(options(0)), trim(options(1))
|
|
526
|
+
end if
|
|
527
|
+
end select
|
|
528
|
+
end if
|
|
529
|
+
end if
|
|
530
|
+
next</code></pre>
|
|
531
|
+
|
|
532
|
+
<tr>
|
|
533
|
+
<th>Lua
|
|
534
|
+
<td class="lua">
|
|
535
|
+
<pre><code>--[[
|
|
536
|
+
Simple signal/slot implementation
|
|
537
|
+
]]
|
|
538
|
+
local signal_mt = {
|
|
539
|
+
__index = {
|
|
540
|
+
register = table.insert
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function signal_mt.__index:emit(... --[[ Comment in params ]])
|
|
544
|
+
for _, slot in ipairs(self) do
|
|
545
|
+
slot(self, ...)
|
|
546
|
+
end
|
|
547
|
+
end
|
|
548
|
+
local function create_signal()
|
|
549
|
+
return setmetatable({}, signal_mt)
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
-- Signal test
|
|
553
|
+
local signal = create_signal()
|
|
554
|
+
signal:register(function (signal, ...)
|
|
555
|
+
print(...)
|
|
556
|
+
end)
|
|
557
|
+
signal:emit('Answer to Life, the Universe, and Everything:', 42)
|
|
558
|
+
|
|
559
|
+
--[==[ [=[ [[
|
|
560
|
+
Nested ]]
|
|
561
|
+
multi-line ]=]
|
|
562
|
+
comment ]==]
|
|
563
|
+
[==[ Nested
|
|
564
|
+
[=[ multi-line
|
|
565
|
+
[[ string
|
|
566
|
+
]] ]=] ]==]
|
|
567
|
+
</code></pre>
|
|
568
|
+
|
|
569
|
+
<tr>
|
|
570
|
+
<th>Delphi
|
|
571
|
+
<td class="delphi">
|
|
572
|
+
<pre><code>TList=Class(TObject)
|
|
573
|
+
Private
|
|
574
|
+
Some: String;
|
|
575
|
+
Public
|
|
576
|
+
Procedure Inside;
|
|
577
|
+
End;{TList}
|
|
578
|
+
|
|
579
|
+
Procedure CopyFile(InFileName,var OutFileName:String);
|
|
580
|
+
Const
|
|
581
|
+
BufSize=4096; (* Huh? *)
|
|
582
|
+
Var
|
|
583
|
+
InFile,OutFile:TStream;
|
|
584
|
+
Buffer:Array[1..BufSize] Of Byte;
|
|
585
|
+
ReadBufSize:Integer;
|
|
586
|
+
Begin
|
|
587
|
+
InFile:=Nil;
|
|
588
|
+
OutFile:=Nil;
|
|
589
|
+
Try
|
|
590
|
+
InFile:=TFileStream.Create(InFileName,fmOpenRead);
|
|
591
|
+
OutFile:=TFileStream.Create(OutFileName,fmCreate);
|
|
592
|
+
Repeat
|
|
593
|
+
ReadBufSize:=InFile.Read(Buffer,BufSize);
|
|
594
|
+
OutFile.Write(Buffer,ReadBufSize);
|
|
595
|
+
Until ReadBufSize<>BufSize;
|
|
596
|
+
Log('File '''+InFileName+''' copied'#13#10);
|
|
597
|
+
Finally
|
|
598
|
+
InFile.Free;
|
|
599
|
+
OutFile.Free;
|
|
600
|
+
End;{Try}
|
|
601
|
+
End;{CopyFile}
|
|
602
|
+
</code></pre>
|
|
603
|
+
|
|
604
|
+
<tr>
|
|
605
|
+
<th>Java
|
|
606
|
+
<td class="java">
|
|
607
|
+
<pre><code>package l2f.gameserver.model;
|
|
608
|
+
|
|
609
|
+
import java.util.ArrayList;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Mother class of all character objects of the world (PC, NPC...)<BR><BR>
|
|
613
|
+
*
|
|
614
|
+
*/
|
|
615
|
+
public abstract class L2Character extends L2Object
|
|
616
|
+
{
|
|
617
|
+
protected static final Logger _log = Logger.getLogger(L2Character.class.getName());
|
|
618
|
+
|
|
619
|
+
public static final Short ABNORMAL_EFFECT_BLEEDING = 0x0001; // not sure
|
|
620
|
+
public static final Short ABNORMAL_EFFECT_POISON = 0x0002;
|
|
621
|
+
|
|
622
|
+
public void detachAI() {
|
|
623
|
+
_ai = null;
|
|
624
|
+
//jbf = null;
|
|
625
|
+
if (1 > 5) {
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
public void moveTo(int x, int y, int z) {
|
|
631
|
+
moveTo(x, y, z, 0);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/** Task of AI notification */
|
|
635
|
+
@SuppressWarnings( { "nls", "unqualified-field-access", "boxing" })
|
|
636
|
+
public class NotifyAITask implements Runnable {
|
|
637
|
+
private final CtrlEvent _evt;
|
|
638
|
+
|
|
639
|
+
public void run() {
|
|
640
|
+
try {
|
|
641
|
+
getAI().notifyEvent(_evt, null, null);
|
|
642
|
+
} catch (Throwable t) {
|
|
643
|
+
_log.warning("Exception " + t);
|
|
644
|
+
t.printStackTrace();
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
}
|
|
650
|
+
</code></pre>
|
|
651
|
+
|
|
652
|
+
<tr>
|
|
653
|
+
<th>C++
|
|
654
|
+
<td class="cpp">
|
|
655
|
+
<pre><code>#include <iostream>
|
|
656
|
+
|
|
657
|
+
int main(int argc, char *argv[]) {
|
|
658
|
+
|
|
659
|
+
/* An annoying "Hello World" example */
|
|
660
|
+
for (auto i = 0; i < 0xFFFF; i++)
|
|
661
|
+
cout << "Hello, World!" << endl;
|
|
662
|
+
|
|
663
|
+
char c = '\n'; // just a test
|
|
664
|
+
unordered_map <string, vector<string> > m;
|
|
665
|
+
m["key"] = "\\\\"; // yeah, I know it's an error
|
|
666
|
+
}
|
|
667
|
+
</code></pre>
|
|
668
|
+
|
|
669
|
+
<tr>
|
|
670
|
+
<th>Objective C
|
|
671
|
+
<td class="objectivec">
|
|
672
|
+
<pre>
|
|
673
|
+
<code>
|
|
674
|
+
#import <UIKit/UIKit.h>
|
|
675
|
+
#import "Dependency.h"
|
|
676
|
+
|
|
677
|
+
@protocol WorldDataSource
|
|
678
|
+
@optional
|
|
679
|
+
- (NSString*)worldName;
|
|
680
|
+
@required
|
|
681
|
+
- (BOOL)allowsToLive;
|
|
682
|
+
@end
|
|
683
|
+
|
|
684
|
+
@interface Test : NSObject <HelloDelegate, WorldDataSource> {
|
|
685
|
+
NSString *_greeting;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
@property (nonatomic, readonly) NSString *greeting;
|
|
689
|
+
- (IBAction) show;
|
|
690
|
+
@end
|
|
691
|
+
|
|
692
|
+
@implementation Test
|
|
693
|
+
|
|
694
|
+
@synthesize test=_test;
|
|
695
|
+
|
|
696
|
+
+ (id) test {
|
|
697
|
+
return [self testWithGreeting:@"Hello, world!\nFoo bar!"];
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
+ (id) testWithGreeting:(NSString*)greeting {
|
|
701
|
+
return [[[self alloc] initWithGreeting:greeting] autorelease];
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
- (id) initWithGreeting:(NSString*)greeting {
|
|
705
|
+
if ( (self = [super init]) ) {
|
|
706
|
+
_greeting = [greeting retain];
|
|
707
|
+
}
|
|
708
|
+
return self;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
- (void) dealloc {
|
|
712
|
+
[_greeting release];
|
|
713
|
+
[super dealloc];
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
@end
|
|
717
|
+
|
|
718
|
+
</code></pre>
|
|
719
|
+
|
|
720
|
+
<tr>
|
|
721
|
+
<th>Vala
|
|
722
|
+
<td class="vala">
|
|
723
|
+
<pre><code>using DBus;
|
|
724
|
+
|
|
725
|
+
namespace Test {
|
|
726
|
+
class Foo : Object {
|
|
727
|
+
public signal void some_event (); // definition of the signal
|
|
728
|
+
public void method () {
|
|
729
|
+
some_event (); // emitting the signal (callbacks get invoked)
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/* defining a class */
|
|
735
|
+
class Track : GLib.Object { /* subclassing 'GLib.Object' */
|
|
736
|
+
public double mass; /* a public field */
|
|
737
|
+
public double name { get; set; } /* a public property */
|
|
738
|
+
private bool terminated = false; /* a private field */
|
|
739
|
+
public void terminate() { /* a public method */
|
|
740
|
+
terminated = true;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
const ALL_UPPER_CASE = "you should follow this convention";
|
|
745
|
+
|
|
746
|
+
var t = new Track(); // same as: Track t = new Track();
|
|
747
|
+
var s = "hello"; // same as: string s = "hello";
|
|
748
|
+
var l = new List<int>(); // same as: List<int> l = new List<int>();
|
|
749
|
+
var i = 10; // same as: int i = 10;
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
#if (ololo)
|
|
753
|
+
Regex regex = /foo/;
|
|
754
|
+
#endif
|
|
755
|
+
|
|
756
|
+
/*
|
|
757
|
+
* Entry point can be outside class
|
|
758
|
+
*/
|
|
759
|
+
void main () {
|
|
760
|
+
var long_string = """
|
|
761
|
+
Example of "verbatim string".
|
|
762
|
+
Same as in @"string" in C#
|
|
763
|
+
"""
|
|
764
|
+
var foo = new Foo ();
|
|
765
|
+
foo.some_event.connect (callback_a); // connecting the callback functions
|
|
766
|
+
foo.some_event.connect (callback_b);
|
|
767
|
+
foo.method ();
|
|
768
|
+
}
|
|
769
|
+
</code></pre>
|
|
770
|
+
|
|
771
|
+
<tr>
|
|
772
|
+
<th>C#
|
|
773
|
+
<td class="cs">
|
|
774
|
+
<pre><code>using System;
|
|
775
|
+
|
|
776
|
+
public class Program
|
|
777
|
+
{
|
|
778
|
+
/// <summary>The entry point to the program.</summary>
|
|
779
|
+
/// <remarks>
|
|
780
|
+
/// Using the Visual Studio style, the tags in this comment
|
|
781
|
+
/// should be grey, but this text should be green.
|
|
782
|
+
/// This comment should be green on the inside:
|
|
783
|
+
/// <!-- I'm green! -->
|
|
784
|
+
/// </remarks>
|
|
785
|
+
public static int Main(string[] args)
|
|
786
|
+
{
|
|
787
|
+
Console.WriteLine("Hello, World!");
|
|
788
|
+
string s = @"This
|
|
789
|
+
""string""
|
|
790
|
+
spans
|
|
791
|
+
multiple
|
|
792
|
+
lines!";
|
|
793
|
+
return 0;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
</code></pre>
|
|
797
|
+
|
|
798
|
+
<tr>
|
|
799
|
+
<th>RenderMan RSL
|
|
800
|
+
<td class="rsl">
|
|
801
|
+
<pre><code>#define TEST_DEFINE 3.14
|
|
802
|
+
/* plastic surface shader
|
|
803
|
+
*
|
|
804
|
+
* Pixie is:
|
|
805
|
+
* (c) Copyright 1999-2003 Okan Arikan. All rights reserved.
|
|
806
|
+
*/
|
|
807
|
+
|
|
808
|
+
surface plastic (float Ka = 1, Kd = 0.5, Ks = 0.5, roughness = 0.1;
|
|
809
|
+
color specularcolor = 1;) {
|
|
810
|
+
normal Nf = faceforward (normalize(N),I);
|
|
811
|
+
Ci = Cs * (Ka*ambient() + Kd*diffuse(Nf)) + specularcolor * Ks *
|
|
812
|
+
specular(Nf,-normalize(I),roughness);
|
|
813
|
+
Oi = Os;
|
|
814
|
+
Ci *= Oi;
|
|
815
|
+
}
|
|
816
|
+
</code></pre>
|
|
817
|
+
|
|
818
|
+
<tr>
|
|
819
|
+
<th>RenderMan RIB
|
|
820
|
+
<td class="rib">
|
|
821
|
+
<pre><code>FrameBegin 0
|
|
822
|
+
Display "Scene" "framebuffer" "rgb"
|
|
823
|
+
Option "searchpath" "shader" "+&:/home/kew"
|
|
824
|
+
Option "trace" "int maxdepth" [4]
|
|
825
|
+
Attribute "visibility" "trace" [1]
|
|
826
|
+
Attribute "irradiance" "maxerror" [0.1]
|
|
827
|
+
Attribute "visibility" "transmission" "opaque"
|
|
828
|
+
Format 640 480 1.0
|
|
829
|
+
ShadingRate 2
|
|
830
|
+
PixelFilter "catmull-rom" 1 1
|
|
831
|
+
PixelSamples 4 4
|
|
832
|
+
Projection "perspective" "fov" 49.5502811377
|
|
833
|
+
Scale 1 1 -1
|
|
834
|
+
|
|
835
|
+
WorldBegin
|
|
836
|
+
|
|
837
|
+
ReadArchive "Lamp.002_Light/instance.rib"
|
|
838
|
+
Surface "plastic"
|
|
839
|
+
ReadArchive "Cube.004_Mesh/instance.rib"
|
|
840
|
+
# ReadArchive "Sphere.010_Mesh/instance.rib"
|
|
841
|
+
# ReadArchive "Sphere.009_Mesh/instance.rib"
|
|
842
|
+
ReadArchive "Sphere.006_Mesh/instance.rib"
|
|
843
|
+
|
|
844
|
+
WorldEnd
|
|
845
|
+
FrameEnd
|
|
846
|
+
</code></pre>
|
|
847
|
+
|
|
848
|
+
<tr>
|
|
849
|
+
<th>MEL (Maya Embedded Language)
|
|
850
|
+
<td class="mel">
|
|
851
|
+
<pre><code>proc string[] getSelectedLights()
|
|
852
|
+
|
|
853
|
+
{
|
|
854
|
+
string $selectedLights[];
|
|
855
|
+
|
|
856
|
+
string $select[] = `ls -sl -dag -leaf`;
|
|
857
|
+
|
|
858
|
+
for ( $shape in $select )
|
|
859
|
+
{
|
|
860
|
+
// Determine if this is a light.
|
|
861
|
+
//
|
|
862
|
+
string $class[] = getClassification( `nodeType $shape` );
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
if ( ( `size $class` ) > 0 && ( "light" == $class[0] ) )
|
|
866
|
+
{
|
|
867
|
+
$selectedLights[ `size $selectedLights` ] = $shape;
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// Result is an array of all lights included in
|
|
872
|
+
|
|
873
|
+
// current selection list.
|
|
874
|
+
return $selectedLights;
|
|
875
|
+
}
|
|
876
|
+
</code></pre>
|
|
877
|
+
|
|
878
|
+
<tr>
|
|
879
|
+
<th>SQL
|
|
880
|
+
<td class="sql">
|
|
881
|
+
<pre><code>BEGIN;
|
|
882
|
+
CREATE TABLE "cicero_topic" (
|
|
883
|
+
"id" serial NOT NULL PRIMARY KEY,
|
|
884
|
+
"forum_id" integer NOT NULL,
|
|
885
|
+
"subject" varchar(255) NOT NULL,
|
|
886
|
+
"created" timestamp with time zone NOT NULL
|
|
887
|
+
);
|
|
888
|
+
ALTER TABLE "cicero_topic"
|
|
889
|
+
ADD CONSTRAINT forum_id_refs_id_4be56999
|
|
890
|
+
FOREIGN KEY ("forum_id")
|
|
891
|
+
REFERENCES "cicero_forum" ("id")
|
|
892
|
+
DEFERRABLE INITIALLY DEFERRED;
|
|
893
|
+
|
|
894
|
+
-- Initials
|
|
895
|
+
insert into "cicero_forum"
|
|
896
|
+
("slug", "name", "group", "ordering")
|
|
897
|
+
values
|
|
898
|
+
('test', 'Forum for te''sting', 'Test', 0);
|
|
899
|
+
|
|
900
|
+
-- Test
|
|
901
|
+
select count(*) from cicero_forum;
|
|
902
|
+
|
|
903
|
+
COMMIT;
|
|
904
|
+
</code></pre>
|
|
905
|
+
|
|
906
|
+
<tr>
|
|
907
|
+
<th>SmallTalk
|
|
908
|
+
<td class="smalltalk">
|
|
909
|
+
<pre><code>Object>>method: num
|
|
910
|
+
"comment 123"
|
|
911
|
+
| var1 var2 |
|
|
912
|
+
(1 to: num) do: [:i | |var| ^i].
|
|
913
|
+
Klass with: var1.
|
|
914
|
+
Klass new.
|
|
915
|
+
arr := #('123' 123.345 #hello Transcript var $@).
|
|
916
|
+
arr := #().
|
|
917
|
+
var2 = arr at: 3.
|
|
918
|
+
^ self abc
|
|
919
|
+
|
|
920
|
+
heapExample
|
|
921
|
+
"HeapTest new heapExample"
|
|
922
|
+
"Multiline
|
|
923
|
+
decription"
|
|
924
|
+
| n rnd array time sorted |
|
|
925
|
+
n := 5000.
|
|
926
|
+
"# of elements to sort"
|
|
927
|
+
rnd := Random new.
|
|
928
|
+
array := (1 to: n)
|
|
929
|
+
collect: [:i | rnd next].
|
|
930
|
+
"First, the heap version"
|
|
931
|
+
time := Time
|
|
932
|
+
millisecondsToRun: [sorted := Heap withAll: array.
|
|
933
|
+
1
|
|
934
|
+
to: n
|
|
935
|
+
do: [:i |
|
|
936
|
+
sorted removeFirst.
|
|
937
|
+
sorted add: rnd next]].
|
|
938
|
+
Transcript cr; show: 'Time for Heap: ' , time printString , ' msecs'.
|
|
939
|
+
"The quicksort version"
|
|
940
|
+
time := Time
|
|
941
|
+
millisecondsToRun: [sorted := SortedCollection withAll: array.
|
|
942
|
+
1
|
|
943
|
+
to: n
|
|
944
|
+
do: [:i |
|
|
945
|
+
sorted removeFirst.
|
|
946
|
+
sorted add: rnd next]].
|
|
947
|
+
Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'
|
|
948
|
+
</code></pre>
|
|
949
|
+
|
|
950
|
+
<tr>
|
|
951
|
+
<th>Lisp
|
|
952
|
+
<td class="lisp">
|
|
953
|
+
<pre><code>(defun prompt-for-cd ()
|
|
954
|
+
"Prompts
|
|
955
|
+
for CD"
|
|
956
|
+
(prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
|
|
957
|
+
(prompt-read "Artist" &rest)
|
|
958
|
+
(or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
|
|
959
|
+
(if x (format t "yes") (format t "no" nil) ;and here comment
|
|
960
|
+
)
|
|
961
|
+
;; second line comment
|
|
962
|
+
'(+ 1 2)
|
|
963
|
+
(defvar *lines*) ; list of all lines
|
|
964
|
+
(position-if-not #'sys::whitespacep line :start beg))
|
|
965
|
+
(quote (privet 1 2 3))
|
|
966
|
+
'(hello world)
|
|
967
|
+
(* 5 7)
|
|
968
|
+
(1 2 34 5)
|
|
969
|
+
(:use "aaaa")
|
|
970
|
+
(let ((x 10) (y 20))
|
|
971
|
+
(print (+ x y))
|
|
972
|
+
)</code></pre>
|
|
973
|
+
|
|
974
|
+
<tr>
|
|
975
|
+
<th>Ini file
|
|
976
|
+
<td class="ini">
|
|
977
|
+
<pre><code>;Settings relating to the location and loading of the database
|
|
978
|
+
[Database]
|
|
979
|
+
ProfileDir=.
|
|
980
|
+
ShowProfileMgr=smart
|
|
981
|
+
Profile1_Name[] = "\|/_-=MegaDestoyer=-_\|/"
|
|
982
|
+
DefaultProfile=True
|
|
983
|
+
AutoCreate = no
|
|
984
|
+
|
|
985
|
+
[AutoExec]
|
|
986
|
+
Use="prompt"
|
|
987
|
+
Glob=autoexec_*.ini
|
|
988
|
+
AskAboutIgnoredPlugins=0
|
|
989
|
+
</code></pre>
|
|
990
|
+
|
|
991
|
+
<tr>
|
|
992
|
+
<th>Apache
|
|
993
|
+
<td class="apache">
|
|
994
|
+
<pre><code># rewrite`s rules for wordpress pretty url
|
|
995
|
+
LoadModule rewrite_module modules/mod_rewrite.so
|
|
996
|
+
RewriteCond %{REQUEST_FILENAME} !-f
|
|
997
|
+
RewriteCond %{REQUEST_FILENAME} !-d
|
|
998
|
+
RewriteRule . index.php [NC,L]
|
|
999
|
+
|
|
1000
|
+
ExpiresActive On
|
|
1001
|
+
ExpiresByType application/x-javascript "access plus 1 days"
|
|
1002
|
+
|
|
1003
|
+
<Location /maps/>
|
|
1004
|
+
RewriteMap map txt:map.txt
|
|
1005
|
+
RewriteMap lower int:tolower
|
|
1006
|
+
RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
|
|
1007
|
+
RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
|
|
1008
|
+
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
|
|
1009
|
+
</Location>
|
|
1010
|
+
</code></pre>
|
|
1011
|
+
|
|
1012
|
+
<tr>
|
|
1013
|
+
<th>nginx
|
|
1014
|
+
<td class="nginx">
|
|
1015
|
+
<pre><code>user www www;
|
|
1016
|
+
worker_processes 2;
|
|
1017
|
+
pid /var/run/nginx.pid;
|
|
1018
|
+
error_log /var/log/nginx.error_log debug | info | notice | warn | error | crit;
|
|
1019
|
+
|
|
1020
|
+
events {
|
|
1021
|
+
connections 2000;
|
|
1022
|
+
use kqueue | rtsig | epoll | /dev/poll | select | poll;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
http {
|
|
1026
|
+
log_format main '$remote_addr - $remote_user [$time_local] '
|
|
1027
|
+
'"$request" $status $bytes_sent '
|
|
1028
|
+
'"$http_referer" "$http_user_agent" '
|
|
1029
|
+
'"$gzip_ratio"';
|
|
1030
|
+
|
|
1031
|
+
send_timeout 3m;
|
|
1032
|
+
client_header_buffer_size 1k;
|
|
1033
|
+
|
|
1034
|
+
gzip on;
|
|
1035
|
+
gzip_min_length 1100;
|
|
1036
|
+
|
|
1037
|
+
#lingering_time 30;
|
|
1038
|
+
|
|
1039
|
+
server {
|
|
1040
|
+
listen one.example.com;
|
|
1041
|
+
server_name one.example.com www.one.example.com;
|
|
1042
|
+
access_log /var/log/nginx.access_log main;
|
|
1043
|
+
|
|
1044
|
+
location / {
|
|
1045
|
+
proxy_pass http://127.0.0.1/;
|
|
1046
|
+
proxy_redirect off;
|
|
1047
|
+
proxy_set_header Host $host;
|
|
1048
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
1049
|
+
charset koi8-r;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
location ~* \.(jpg|jpeg|gif)$ {
|
|
1053
|
+
root /spool/www;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
</code></pre>
|
|
1058
|
+
|
|
1059
|
+
<tr>
|
|
1060
|
+
<th>Diff
|
|
1061
|
+
<td class="diff">
|
|
1062
|
+
<pre><code>Index: languages/ini.js
|
|
1063
|
+
===================================================================
|
|
1064
|
+
--- languages/ini.js (revision 199)
|
|
1065
|
+
+++ languages/ini.js (revision 200)
|
|
1066
|
+
@@ -1,8 +1,7 @@
|
|
1067
|
+
hljs.LANGUAGES.ini =
|
|
1068
|
+
{
|
|
1069
|
+
case_insensitive: true,
|
|
1070
|
+
- defaultMode:
|
|
1071
|
+
- {
|
|
1072
|
+
+ defaultMode: {
|
|
1073
|
+
contains: ['comment', 'title', 'setting'],
|
|
1074
|
+
illegal: '[^\\s]'
|
|
1075
|
+
},
|
|
1076
|
+
|
|
1077
|
+
*** /path/to/original timestamp
|
|
1078
|
+
--- /path/to/new timestamp
|
|
1079
|
+
***************
|
|
1080
|
+
*** 1,3 ****
|
|
1081
|
+
--- 1,9 ----
|
|
1082
|
+
+ This is an important
|
|
1083
|
+
+ notice! It should
|
|
1084
|
+
+ therefore be located at
|
|
1085
|
+
+ the beginning of this
|
|
1086
|
+
+ document!
|
|
1087
|
+
|
|
1088
|
+
! compress the size of the
|
|
1089
|
+
! changes.
|
|
1090
|
+
|
|
1091
|
+
It is important to spell
|
|
1092
|
+
</code></pre>
|
|
1093
|
+
|
|
1094
|
+
<tr>
|
|
1095
|
+
<th>DOS batch files
|
|
1096
|
+
<td class="dos">
|
|
1097
|
+
<pre><code>cd \
|
|
1098
|
+
copy a b
|
|
1099
|
+
ping 192.168.0.1
|
|
1100
|
+
@rem ping 192.168.0.1
|
|
1101
|
+
net stop sharedaccess
|
|
1102
|
+
del %tmp% /f /s /q
|
|
1103
|
+
del %temp% /f /s /q
|
|
1104
|
+
ipconfig /flushdns
|
|
1105
|
+
taskkill /F /IM JAVA.EXE /T
|
|
1106
|
+
|
|
1107
|
+
cd Photoshop/Adobe Photoshop CS3/AMT/
|
|
1108
|
+
if exist application.sif (
|
|
1109
|
+
ren application.sif _application.sif
|
|
1110
|
+
) else (
|
|
1111
|
+
ren _application.sif application.sif
|
|
1112
|
+
)
|
|
1113
|
+
|
|
1114
|
+
taskkill /F /IM proquota.exe /T
|
|
1115
|
+
|
|
1116
|
+
sfc /SCANNOW
|
|
1117
|
+
|
|
1118
|
+
set path = test
|
|
1119
|
+
|
|
1120
|
+
xcopy %1\*.* %2
|
|
1121
|
+
</code></pre>
|
|
1122
|
+
|
|
1123
|
+
<tr>
|
|
1124
|
+
<th>Bash
|
|
1125
|
+
<td class="bash">
|
|
1126
|
+
<pre><code>#!/bin/bash
|
|
1127
|
+
|
|
1128
|
+
###### BEGIN CONFIG
|
|
1129
|
+
ACCEPTED_HOSTS="/root/.hag_accepted.conf"
|
|
1130
|
+
BE_VERBOSE=false
|
|
1131
|
+
###### END CONFIG
|
|
1132
|
+
|
|
1133
|
+
if [ "$UID" -ne 0 ]
|
|
1134
|
+
then
|
|
1135
|
+
echo "Superuser rights is required"
|
|
1136
|
+
exit 2
|
|
1137
|
+
fi
|
|
1138
|
+
|
|
1139
|
+
genApacheConf(){
|
|
1140
|
+
if [[ "$2" = "www" ]]
|
|
1141
|
+
then
|
|
1142
|
+
full_domain=$1
|
|
1143
|
+
else
|
|
1144
|
+
full_domain=$2.$1
|
|
1145
|
+
fi
|
|
1146
|
+
host_root="${APACHE_HOME_DIR}$1/$2"
|
|
1147
|
+
echo -e "# Host $1/$2 :"
|
|
1148
|
+
}
|
|
1149
|
+
</code></pre>
|
|
1150
|
+
|
|
1151
|
+
<tr>
|
|
1152
|
+
<th>CMake
|
|
1153
|
+
<td class="cmake">
|
|
1154
|
+
<pre><code>project(test)
|
|
1155
|
+
cmake_minimum_required(VERSION 2.6)
|
|
1156
|
+
|
|
1157
|
+
# IF LINUX
|
|
1158
|
+
if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
|
|
1159
|
+
message("\nOS:\t\tLinux")
|
|
1160
|
+
endif()
|
|
1161
|
+
|
|
1162
|
+
# IF WINDOWS
|
|
1163
|
+
if (${CMAKE_SYSTEM_NAME} MATCHES Windows)
|
|
1164
|
+
message("\nOS:\t\tWindows")
|
|
1165
|
+
endif()
|
|
1166
|
+
|
|
1167
|
+
set(test test0.cpp test1.cpp test2.cpp)
|
|
1168
|
+
|
|
1169
|
+
include_directories(./)
|
|
1170
|
+
|
|
1171
|
+
set(EXECUTABLE_OUTPUT_PATH ../bin)
|
|
1172
|
+
|
|
1173
|
+
add_subdirectory(src)
|
|
1174
|
+
|
|
1175
|
+
add_executable(test WIN32 ${test})
|
|
1176
|
+
|
|
1177
|
+
target_link_libraries(test msimg32)
|
|
1178
|
+
</code></pre>
|
|
1179
|
+
|
|
1180
|
+
<tr>
|
|
1181
|
+
<th>Axapta
|
|
1182
|
+
<td class="axapta">
|
|
1183
|
+
<pre><code>class ExchRateLoadBatch extends RunBaseBatch {
|
|
1184
|
+
ExchRateLoad rbc;
|
|
1185
|
+
container currencies;
|
|
1186
|
+
boolean actual;
|
|
1187
|
+
boolean overwrite;
|
|
1188
|
+
date beg;
|
|
1189
|
+
date end;
|
|
1190
|
+
|
|
1191
|
+
#define.CurrentVersion(5)
|
|
1192
|
+
|
|
1193
|
+
#localmacro.CurrentList
|
|
1194
|
+
currencies,
|
|
1195
|
+
actual,
|
|
1196
|
+
beg,
|
|
1197
|
+
end
|
|
1198
|
+
#endmacro
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
public boolean unpack(container packedClass) {
|
|
1202
|
+
container base;
|
|
1203
|
+
boolean ret;
|
|
1204
|
+
Integer version = runbase::getVersion(packedClass);
|
|
1205
|
+
|
|
1206
|
+
switch (version) {
|
|
1207
|
+
case #CurrentVersion:
|
|
1208
|
+
[version, #CurrentList] = packedClass;
|
|
1209
|
+
return true;
|
|
1210
|
+
default:
|
|
1211
|
+
return false;
|
|
1212
|
+
}
|
|
1213
|
+
return ret;
|
|
1214
|
+
}
|
|
1215
|
+
</code></pre>
|
|
1216
|
+
|
|
1217
|
+
<tr>
|
|
1218
|
+
<th>1С
|
|
1219
|
+
<td class="1c">
|
|
1220
|
+
<pre><code>
|
|
1221
|
+
#Если Клиент Тогда
|
|
1222
|
+
Перем СимвольныйКодКаталога = "ля-ля-ля"; //комментарий
|
|
1223
|
+
Функция Сообщить(Знач ТекстСообщения, ТекстСообщения2) Экспорт //комментарий к функции
|
|
1224
|
+
x=ТекстСообщения+ТекстСообщения2+"
|
|
1225
|
+
|строка1
|
|
1226
|
+
|строка2
|
|
1227
|
+
|строка3";
|
|
1228
|
+
КонецФункции
|
|
1229
|
+
#КонецЕсли
|
|
1230
|
+
|
|
1231
|
+
// Процедура ПриНачалеРаботыСистемы
|
|
1232
|
+
//
|
|
1233
|
+
Процедура ПриНачалеРаботыСистемы()
|
|
1234
|
+
Обработки.Помощник.ПолучитьФорму("Форма").Открыть();
|
|
1235
|
+
d = '21.01.2008'
|
|
1236
|
+
КонецПроцедуры
|
|
1237
|
+
</code></pre>
|
|
1238
|
+
|
|
1239
|
+
<tr>
|
|
1240
|
+
<th>AVR Assembler
|
|
1241
|
+
<td class="avrasm">
|
|
1242
|
+
<pre><code>;* Title: Block Copy Routines
|
|
1243
|
+
;* Version: 1.1
|
|
1244
|
+
|
|
1245
|
+
.include "8515def.inc"
|
|
1246
|
+
|
|
1247
|
+
rjmp RESET ;reset handle
|
|
1248
|
+
|
|
1249
|
+
.def flashsize=r16 ;size of block to be copied
|
|
1250
|
+
|
|
1251
|
+
flash2ram:
|
|
1252
|
+
lpm ;get constant
|
|
1253
|
+
st Y+,r0 ;store in SRAM and increment Y-pointer
|
|
1254
|
+
adiw ZL,1 ;increment Z-pointer
|
|
1255
|
+
dec flashsize
|
|
1256
|
+
brne flash2ram ;if not end of table, loop more
|
|
1257
|
+
ret
|
|
1258
|
+
|
|
1259
|
+
.def ramtemp =r1 ;temporary storage register
|
|
1260
|
+
.def ramsize =r16 ;size of block to be copied
|
|
1261
|
+
</code></pre>
|
|
1262
|
+
|
|
1263
|
+
<tr>
|
|
1264
|
+
<th>VHDL
|
|
1265
|
+
<td class="vhdl">
|
|
1266
|
+
<pre><code>------------------------------------
|
|
1267
|
+
-- RS Trigger with Assynch. Reset --
|
|
1268
|
+
------------------------------------
|
|
1269
|
+
|
|
1270
|
+
library IEEE;
|
|
1271
|
+
use IEEE.STD_LOGIC_1164.all;
|
|
1272
|
+
|
|
1273
|
+
entity RS_AR is
|
|
1274
|
+
generic (T: Time := 0ns);
|
|
1275
|
+
|
|
1276
|
+
port(
|
|
1277
|
+
-- Default RS Trigger
|
|
1278
|
+
R : in STD_LOGIC;
|
|
1279
|
+
S : in STD_LOGIC;
|
|
1280
|
+
Q : out STD_LOGIC;
|
|
1281
|
+
nQ : out STD_LOGIC;
|
|
1282
|
+
|
|
1283
|
+
-- Special Input Signals
|
|
1284
|
+
AR : in STD_LOGIC; -- assynch. reset
|
|
1285
|
+
C : in STD_LOGIC -- synch. signal
|
|
1286
|
+
);
|
|
1287
|
+
end RS_AR;
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
architecture RS_AR of RS_AR is
|
|
1291
|
+
signal QT: std_logic; -- Q(t)
|
|
1292
|
+
begin
|
|
1293
|
+
|
|
1294
|
+
process(C, AR) is
|
|
1295
|
+
subtype RS is std_logic_vector ( 1 downto 0 );
|
|
1296
|
+
begin
|
|
1297
|
+
if AR='0' then
|
|
1298
|
+
QT <= '0';
|
|
1299
|
+
else
|
|
1300
|
+
if rising_edge(C) then
|
|
1301
|
+
|
|
1302
|
+
if not (R'stable(T) and S'stable(T)) then
|
|
1303
|
+
QT <= 'X';
|
|
1304
|
+
else
|
|
1305
|
+
|
|
1306
|
+
case RS'(R&S) is
|
|
1307
|
+
when "01" => QT <= '1';
|
|
1308
|
+
when "10" => QT <= '0';
|
|
1309
|
+
when "11" => QT <= 'X';
|
|
1310
|
+
when others => null;
|
|
1311
|
+
end case;
|
|
1312
|
+
|
|
1313
|
+
end if;
|
|
1314
|
+
end if;
|
|
1315
|
+
end if;
|
|
1316
|
+
end process;
|
|
1317
|
+
|
|
1318
|
+
Q <= QT;
|
|
1319
|
+
nQ <= not QT;
|
|
1320
|
+
|
|
1321
|
+
end RS_AR;
|
|
1322
|
+
</code></pre>
|
|
1323
|
+
|
|
1324
|
+
<tr>
|
|
1325
|
+
<th>Parser 3
|
|
1326
|
+
<td class="parser3">
|
|
1327
|
+
<pre><code>@CLASS
|
|
1328
|
+
base
|
|
1329
|
+
|
|
1330
|
+
@USE
|
|
1331
|
+
module.p
|
|
1332
|
+
|
|
1333
|
+
@BASE
|
|
1334
|
+
class
|
|
1335
|
+
|
|
1336
|
+
# Comment for code
|
|
1337
|
+
@create[aParam1;aParam2][local1;local2]
|
|
1338
|
+
^connect[mysql://host/database?ClientCharset=windows-1251]
|
|
1339
|
+
^for[i](1;10){
|
|
1340
|
+
<p class="paragraph">^eval($i+10)</p>
|
|
1341
|
+
^connect[mysql://host/database]{
|
|
1342
|
+
$tab[^table::sql{select * from `table` where a='1'}]
|
|
1343
|
+
$var_Name[some${value}]
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
^rem{
|
|
1348
|
+
Multiline comment with code: $var
|
|
1349
|
+
^while(true){
|
|
1350
|
+
^for[i](1;10){
|
|
1351
|
+
^sleep[]
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
^taint[^#0A]
|
|
1356
|
+
|
|
1357
|
+
@GET_base[]
|
|
1358
|
+
## Comment for code
|
|
1359
|
+
# Isn't comment
|
|
1360
|
+
$result[$.hash_item1[one] $.hash_item2[two]]
|
|
1361
|
+
</code></pre>
|
|
1362
|
+
|
|
1363
|
+
<tr>
|
|
1364
|
+
<th>TeX
|
|
1365
|
+
<td class="tex">
|
|
1366
|
+
<pre>
|
|
1367
|
+
<code>\documentclass{article}
|
|
1368
|
+
\usepackage[koi8-r]{inputenc}
|
|
1369
|
+
\hoffset=0pt
|
|
1370
|
+
\voffset=.3em
|
|
1371
|
+
\tolerance=400
|
|
1372
|
+
\newcommand{\eTiX}{\TeX}
|
|
1373
|
+
\begin{document}
|
|
1374
|
+
\section*{Highlight.js}
|
|
1375
|
+
\begin{table}[c|c]
|
|
1376
|
+
$\frac 12\, + \, \frac 1{x^3}\text{Hello \! world}$ & \textbf{Goodbye\~ world} \\\eTiX $ \pi=400 $
|
|
1377
|
+
\end{table}
|
|
1378
|
+
Ch\'erie, \c{c}a ne me pla\^\i t pas! % comment \b
|
|
1379
|
+
G\"otterd\"ammerung~45\%=34.
|
|
1380
|
+
$$
|
|
1381
|
+
\int\limits_{0}^{\pi}\frac{4}{x-7}=3
|
|
1382
|
+
$$
|
|
1383
|
+
\end{document}
|
|
1384
|
+
</code></pre>
|
|
1385
|
+
|
|
1386
|
+
<tr>
|
|
1387
|
+
<th>Haskell
|
|
1388
|
+
<td class="haskell">
|
|
1389
|
+
<pre>
|
|
1390
|
+
<code>module Shapes
|
|
1391
|
+
( Point(..) ,
|
|
1392
|
+
Shape(..) ,
|
|
1393
|
+
surface ,
|
|
1394
|
+
baseCircle ,
|
|
1395
|
+
baseRect
|
|
1396
|
+
) where
|
|
1397
|
+
|
|
1398
|
+
-- Single line comment
|
|
1399
|
+
{-
|
|
1400
|
+
multi
|
|
1401
|
+
line
|
|
1402
|
+
comment
|
|
1403
|
+
-}
|
|
1404
|
+
data Point = Point Float Float deriving (Show)
|
|
1405
|
+
data Shape = Circle Point Float | Rectangle Point Point deriving (Show)
|
|
1406
|
+
|
|
1407
|
+
surface :: Shape -> Float
|
|
1408
|
+
surface (Circle _ r) = pi * r^2
|
|
1409
|
+
surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1)
|
|
1410
|
+
|
|
1411
|
+
baseCircle :: Float -> Shape
|
|
1412
|
+
baseCircle r = Circle(Point 0 0) r
|
|
1413
|
+
|
|
1414
|
+
baseRect :: Float -> Float -> Shape
|
|
1415
|
+
baseRect w h = Rectangle (Point 0 0) (Point w h)
|
|
1416
|
+
</code></pre>
|
|
1417
|
+
|
|
1418
|
+
<tr>
|
|
1419
|
+
<th>Erlang
|
|
1420
|
+
<td class="erlang">
|
|
1421
|
+
<pre><code>-module(ssh_cli).
|
|
1422
|
+
|
|
1423
|
+
-behaviour(ssh_channel).
|
|
1424
|
+
|
|
1425
|
+
-include("ssh.hrl").
|
|
1426
|
+
%% backwards compatibility
|
|
1427
|
+
-export([listen/1, listen/2, listen/3, listen/4, stop/1]).
|
|
1428
|
+
|
|
1429
|
+
%% state
|
|
1430
|
+
-record(state, {
|
|
1431
|
+
cm,
|
|
1432
|
+
channel
|
|
1433
|
+
}).
|
|
1434
|
+
|
|
1435
|
+
test(Foo)->Foo.
|
|
1436
|
+
|
|
1437
|
+
init([Shell, Exec]) ->
|
|
1438
|
+
{ok, #state{shell = Shell, exec = Exec}};
|
|
1439
|
+
init([Shell]) ->
|
|
1440
|
+
false = not true,
|
|
1441
|
+
io:format("Hello, \"~p!~n", [atom_to_list('World')]),
|
|
1442
|
+
{ok, #state{shell = Shell}}.
|
|
1443
|
+
|
|
1444
|
+
concat([Single]) -> Single;
|
|
1445
|
+
concat(RList) ->
|
|
1446
|
+
EpsilonFree = lists:filter(
|
|
1447
|
+
fun (Element) ->
|
|
1448
|
+
case Element of
|
|
1449
|
+
epsilon -> false;
|
|
1450
|
+
_ -> true
|
|
1451
|
+
end
|
|
1452
|
+
end,
|
|
1453
|
+
RList),
|
|
1454
|
+
case EpsilonFree of
|
|
1455
|
+
[Single] -> Single;
|
|
1456
|
+
Other -> {concat, Other}
|
|
1457
|
+
end.
|
|
1458
|
+
|
|
1459
|
+
union_dot_union({union, _}=U1, {union, _}=U2) ->
|
|
1460
|
+
union(lists:flatten(
|
|
1461
|
+
lists:map(
|
|
1462
|
+
fun (X1) ->
|
|
1463
|
+
lists:map(
|
|
1464
|
+
fun (X2) ->
|
|
1465
|
+
concat([X1, X2])
|
|
1466
|
+
end,
|
|
1467
|
+
union_to_list(U2)
|
|
1468
|
+
)
|
|
1469
|
+
end,
|
|
1470
|
+
union_to_list(U1)
|
|
1471
|
+
))).
|
|
1472
|
+
</code></pre>
|
|
1473
|
+
|
|
1474
|
+
<tr>
|
|
1475
|
+
<th>Erlang REPL
|
|
1476
|
+
<td class="erlang_repl">
|
|
1477
|
+
<pre><code>1> Str = "abcd".
|
|
1478
|
+
"abcd"
|
|
1479
|
+
2> L = test:length(Str).
|
|
1480
|
+
4
|
|
1481
|
+
3> Descriptor = {L, list_to_atom(Str)}.
|
|
1482
|
+
{4,abcd}
|
|
1483
|
+
4> L.
|
|
1484
|
+
4
|
|
1485
|
+
5> b().
|
|
1486
|
+
Descriptor = {4,abcd}
|
|
1487
|
+
L = 4
|
|
1488
|
+
Str = "abcd"
|
|
1489
|
+
ok
|
|
1490
|
+
6> f(L).
|
|
1491
|
+
ok
|
|
1492
|
+
7> b().
|
|
1493
|
+
Descriptor = {4,abcd}
|
|
1494
|
+
Str = "abcd"
|
|
1495
|
+
ok
|
|
1496
|
+
8> {L, _} = Descriptor.
|
|
1497
|
+
{4,abcd}
|
|
1498
|
+
9> L.
|
|
1499
|
+
4
|
|
1500
|
+
</code></pre>
|
|
1501
|
+
|
|
1502
|
+
</table>
|
|
1503
|
+
|
|
1504
|
+
<script>
|
|
1505
|
+
function testDetection() {
|
|
1506
|
+
if (!hljs.initHighlighting.called) {
|
|
1507
|
+
window.setTimeout(testDetection, 500);
|
|
1508
|
+
return;
|
|
1509
|
+
}
|
|
1510
|
+
var table = document.getElementById('autotest');
|
|
1511
|
+
var tds = table.getElementsByTagName('TD');
|
|
1512
|
+
var failed = [];
|
|
1513
|
+
for (var i = 0; i < tds.length; i++) {
|
|
1514
|
+
var tdClass = tds[i].className;
|
|
1515
|
+
if (!hljs.LANGUAGES.hasOwnProperty(tdClass)) {
|
|
1516
|
+
tds[i].parentNode.style.display = 'none';
|
|
1517
|
+
continue;
|
|
1518
|
+
}
|
|
1519
|
+
var code = tds[i].getElementsByTagName('CODE')[0];
|
|
1520
|
+
var passed = tdClass == code.className;
|
|
1521
|
+
var result = document.createElement('DIV');
|
|
1522
|
+
result.className = 'test';
|
|
1523
|
+
result.innerHTML = '<var class="'+ (passed ? 'passed' : 'failed') +'">' + code.className + '</var>';
|
|
1524
|
+
function counts(r) {
|
|
1525
|
+
return ' (' + r.kw + '+' + r.re + '=' + (r.kw + r.re) + ')';
|
|
1526
|
+
}
|
|
1527
|
+
result.innerHTML += counts(code.result);
|
|
1528
|
+
if (code.second_best) {
|
|
1529
|
+
result.innerHTML += '<br>' + code.second_best.language +
|
|
1530
|
+
counts(code.second_best) ;
|
|
1531
|
+
}
|
|
1532
|
+
tds[i].parentNode.getElementsByTagName('th')[0].appendChild(result);
|
|
1533
|
+
if (!passed) {
|
|
1534
|
+
failed.push(tdClass);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
var summary = document.getElementById('summary');
|
|
1538
|
+
summary.innerHTML = failed.length ? ('Failed tests: ' + failed.join(', ')) : 'All tests passed';
|
|
1539
|
+
summary.className = failed.length ? 'failed' : 'passed';
|
|
1540
|
+
}
|
|
1541
|
+
testDetection();
|
|
1542
|
+
</script>
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
<h2>Special tests</h2>
|
|
1546
|
+
|
|
1547
|
+
<table>
|
|
1548
|
+
<tr>
|
|
1549
|
+
<th>Explicit Python highlighting
|
|
1550
|
+
<td>
|
|
1551
|
+
<pre><code class="python">for x in [1, 2, 3]:
|
|
1552
|
+
count(x)
|
|
1553
|
+
</code></pre>
|
|
1554
|
+
|
|
1555
|
+
<tr>
|
|
1556
|
+
<th>Language set on <pre>
|
|
1557
|
+
<td>
|
|
1558
|
+
<pre class="python"><code>for x in [1, 2, 3]:
|
|
1559
|
+
count(x)
|
|
1560
|
+
</code></pre>
|
|
1561
|
+
|
|
1562
|
+
<tr>
|
|
1563
|
+
<th>HTML5-style language class (language-python)
|
|
1564
|
+
<td>
|
|
1565
|
+
<pre><code class="language-python">for x in [1, 2, 3]:
|
|
1566
|
+
count(x)
|
|
1567
|
+
</code></pre>
|
|
1568
|
+
|
|
1569
|
+
<tr>
|
|
1570
|
+
<th>Replacing TAB with 4 spaces
|
|
1571
|
+
<td>
|
|
1572
|
+
<pre><code class="python">for x in [1, 2, 3]:
|
|
1573
|
+
count(x)
|
|
1574
|
+
</code></pre>
|
|
1575
|
+
|
|
1576
|
+
<tr>
|
|
1577
|
+
<th>Custom markup
|
|
1578
|
+
<td>
|
|
1579
|
+
<pre><code><<a href="http://dev.w3.org/html5/spec/Overview.html#the-div-element">div</a> id="contents">
|
|
1580
|
+
<del><p>Hello, World!</del>
|
|
1581
|
+
</div>
|
|
1582
|
+
</code></pre>
|
|
1583
|
+
|
|
1584
|
+
<tr>
|
|
1585
|
+
<th>Custom markup + TAB replacement
|
|
1586
|
+
<td>
|
|
1587
|
+
<pre><code class="python">for x in [1, 2, 3]:
|
|
1588
|
+
<span style="background:yellow"> </span>count(x)
|
|
1589
|
+
if x == 3:
|
|
1590
|
+
<span style="background:yellow"> </span>count(x + 1)
|
|
1591
|
+
</code></pre>
|
|
1592
|
+
|
|
1593
|
+
<tr>
|
|
1594
|
+
<th>Non-pre container
|
|
1595
|
+
<td>
|
|
1596
|
+
<div id="codecontainer" class="code">for x in [1, 2, 3]:<br>
|
|
1597
|
+
count(x)<br>
|
|
1598
|
+
</div>
|
|
1599
|
+
<script>hljs.highlightBlock(document.getElementById('codecontainer'), null, true);</script>
|
|
1600
|
+
|
|
1601
|
+
<tr>
|
|
1602
|
+
<th>Disabled highlighting
|
|
1603
|
+
<td>
|
|
1604
|
+
<pre><code class="no-highlight"><div id="contents">
|
|
1605
|
+
<p>Hello, World!
|
|
1606
|
+
</div>
|
|
1607
|
+
</code></pre>
|
|
1608
|
+
|
|
1609
|
+
</table>
|