codex 1.0.2
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/History.txt +8 -0
- data/LICENSE.txt +29 -0
- data/Manifest.txt +95 -0
- data/PostInstall.txt +5 -0
- data/README.txt +31 -0
- data/Rakefile +4 -0
- data/app_generators/codex/USAGE +5 -0
- data/app_generators/codex/codex_generator.rb +106 -0
- data/app_generators/codex/templates/Rakefile +54 -0
- data/app_generators/codex/templates/bin/build_all.rb +47 -0
- data/app_generators/codex/templates/bin/postprocess_all.rb +5 -0
- data/app_generators/codex/templates/bin/pressie.rb +7 -0
- data/app_generators/codex/templates/code/control/basic_continuation.rb +11 -0
- data/app_generators/codex/templates/code/control/cc_throw_catch.rb +59 -0
- data/app_generators/codex/templates/code/control/closure_continuation.rb +8 -0
- data/app_generators/codex/templates/code/control/closure_continuation_2.rb +12 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSS.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CSharp.html +134 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CollapseCode.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Cpp.html +190 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/CrashTest.html +108 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Delphi.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/FirstLine.html +90 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Index.html +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Java.html +122 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/JavaScript.html +112 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoControls.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/NoGutter.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/PHP.html +102 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Python.html +121 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Ruby.html +131 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SQL.html +98 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/clipboard.swf +0 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCSharp.js +32 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCpp.js +73 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushCss.js +52 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushDelphi.js +34 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJScript.js +22 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushJava.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPhp.js +60 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushPython.js +30 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushRuby.js +28 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushSql.js +42 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushVb.js +29 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shBrushXml.js +70 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.js +414 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Scripts/shCore.uncompressed.js +674 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/ShowColumns.html +89 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/SmartTabs.html +88 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css +158 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Styles/TestPages.css +63 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/Templates/Test.dwt +80 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/VB.html +115 -0
- data/app_generators/codex/templates/dp.SyntaxHighlighter/XML.html +136 -0
- data/app_generators/codex/templates/html/all.html +0 -0
- data/app_generators/codex/templates/readme.txt +4 -0
- data/app_generators/codex/templates/slides/basics.slides +37 -0
- data/app_generators/codex/templates/slides/building.slides +27 -0
- data/app_generators/codex/templates/slides/example.slides +80 -0
- data/app_generators/codex/templates/slides/including_code.slides +80 -0
- data/app_generators/codex/templates/slides/metadata.yml +4 -0
- data/app_generators/codex/templates/slides/table_of_contents.slides +14 -0
- data/app_generators/codex/templates/ui/default/blank.gif +0 -0
- data/app_generators/codex/templates/ui/default/bodybg.gif +0 -0
- data/app_generators/codex/templates/ui/default/framing.css +23 -0
- data/app_generators/codex/templates/ui/default/iepngfix.htc +42 -0
- data/app_generators/codex/templates/ui/default/opera.css +7 -0
- data/app_generators/codex/templates/ui/default/outline.css +15 -0
- data/app_generators/codex/templates/ui/default/pretty.css +86 -0
- data/app_generators/codex/templates/ui/default/print.css +1 -0
- data/app_generators/codex/templates/ui/default/s5-core.css +9 -0
- data/app_generators/codex/templates/ui/default/slides.css +3 -0
- data/app_generators/codex/templates/ui/default/slides.js +553 -0
- data/bin/codex +17 -0
- data/codex.gemspec +30 -0
- data/config/hoe.rb +75 -0
- data/config/requirements.rb +15 -0
- data/lib/codex.rb +7 -0
- data/lib/codex/content.rb +160 -0
- data/lib/codex/pressie.rb +108 -0
- data/lib/codex/version.rb +9 -0
- data/lib/stylesheets/pressie.css +196 -0
- data/lib/stylesheets/print.css +149 -0
- data/lib/stylesheets/ruby.png +0 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/setup.rb +1585 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +9 -0
- data/test/test_codex.rb +11 -0
- data/test/test_codex_generator.rb +78 -0
- data/test/test_generator_helper.rb +29 -0
- data/test/test_helper.rb +2 -0
- metadata +163 -0
@@ -0,0 +1,112 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->JavaScript<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="js">
|
51
|
+
/***********************************
|
52
|
+
** Multiline block comments
|
53
|
+
**********************************/
|
54
|
+
|
55
|
+
// Hang test � partir de l`idagence / id type publication ``````
|
56
|
+
|
57
|
+
var stringWithUrl1 = "http://blog.dreamprojections.com";
|
58
|
+
var stringWithUrl2 = 'http://www.dreamprojections.com';
|
59
|
+
|
60
|
+
// callback for the match sorting
|
61
|
+
dpSyntaxHighlighter.prototype.SortCallback = function(m1, m2)
|
62
|
+
{
|
63
|
+
// sort matches by index first
|
64
|
+
if(m1.index < m2.index)
|
65
|
+
return -1;
|
66
|
+
else if(m1.index > m2.index)
|
67
|
+
return 1;
|
68
|
+
else
|
69
|
+
{
|
70
|
+
/*
|
71
|
+
// if index is the same, sort by length
|
72
|
+
if(m1.length < m2.length)
|
73
|
+
return -1;
|
74
|
+
else if(m1.length > m2.length)
|
75
|
+
return 1;
|
76
|
+
*/
|
77
|
+
}
|
78
|
+
|
79
|
+
alert('hello // world');
|
80
|
+
return 0;
|
81
|
+
}
|
82
|
+
</pre>
|
83
|
+
<!-- InstanceEndEditable -->
|
84
|
+
<hr/>
|
85
|
+
Text body after.
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div class="footer">
|
90
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
94
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
95
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
96
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
97
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
98
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
99
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
100
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
101
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
102
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
103
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
104
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
105
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
106
|
+
<script class="javascript">
|
107
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
108
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
109
|
+
</script>
|
110
|
+
|
111
|
+
</body>
|
112
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->No controls<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<p>You can hide the gutter by adding <code>nocontrols</code>.</p>
|
51
|
+
<p><code><textarea name="code" class="c#:nocontrols" rows="15" cols="100"></code></p>
|
52
|
+
|
53
|
+
<pre name="code">
|
54
|
+
1 2 3 4 5 6 7 8 9 10
|
55
|
+
string path = "";
|
56
|
+
string safeReferrer = null;
|
57
|
+
FileInfo fileInfo = new FileInfo(string.Format("{0}/{1}", path, image));
|
58
|
+
int index = 0;
|
59
|
+
</pre>
|
60
|
+
<!-- InstanceEndEditable -->
|
61
|
+
<hr/>
|
62
|
+
Text body after.
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div class="footer">
|
67
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
71
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
72
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
73
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
74
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
75
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
76
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
77
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
78
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
79
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
80
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
81
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
82
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
83
|
+
<script class="javascript">
|
84
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
85
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
86
|
+
</script>
|
87
|
+
|
88
|
+
</body>
|
89
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->No gutter<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<p>You can hide the gutter by adding <code>nogutter</code>.</p>
|
51
|
+
<p><code><pre name="code" class="c-sharp:nogutter" rows="15"/></code></p>
|
52
|
+
|
53
|
+
<pre name="code" class="c-sharp:nogutter">
|
54
|
+
1 2 3 4 5 6 7 8 9 10
|
55
|
+
string path = "";
|
56
|
+
string safeReferrer = null;
|
57
|
+
FileInfo fileInfo = new FileInfo(string.Format("{0}/{1}", path, image));
|
58
|
+
int index = 0;
|
59
|
+
</pre>
|
60
|
+
<!-- InstanceEndEditable -->
|
61
|
+
<hr/>
|
62
|
+
Text body after.
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div class="footer">
|
67
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
71
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
72
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
73
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
74
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
75
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
76
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
77
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
78
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
79
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
80
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
81
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
82
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
83
|
+
<script class="javascript">
|
84
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
85
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
86
|
+
</script>
|
87
|
+
|
88
|
+
</body>
|
89
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,102 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->PHP<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="php">
|
51
|
+
/***********************************
|
52
|
+
** Multiline block comments
|
53
|
+
**********************************/
|
54
|
+
|
55
|
+
$stringWithUrl = "http://blog.dreamprojections.com";
|
56
|
+
$stringWithUrl = 'http://www.dreamprojections.com';
|
57
|
+
|
58
|
+
ob_start("parseOutputBuffer"); // Start Code Buffering
|
59
|
+
session_start();
|
60
|
+
|
61
|
+
function parseOutputBuffer($buf) {
|
62
|
+
global $portal_small_code, $portal_gzcompress;
|
63
|
+
global $PHP_SELF, $HTTP_ACCEPT_ENCODING;
|
64
|
+
|
65
|
+
// cleaning out the code.
|
66
|
+
if($portal_small_code && !$portal_gzcompress) {
|
67
|
+
$buf = str_replace(" ", "", $buf);
|
68
|
+
$buf = str_replace("\n", "", $buf);
|
69
|
+
$buf = str_replace(chr(13), "", $buf);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
</pre>
|
73
|
+
<!-- InstanceEndEditable -->
|
74
|
+
<hr/>
|
75
|
+
Text body after.
|
76
|
+
</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div class="footer">
|
80
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
84
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
85
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
86
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
87
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
88
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
89
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
90
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
91
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
92
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
93
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
94
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
95
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
96
|
+
<script class="javascript">
|
97
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
98
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
99
|
+
</script>
|
100
|
+
|
101
|
+
</body>
|
102
|
+
<!-- InstanceEnd --></html>
|
@@ -0,0 +1,121 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Test.dwt" codeOutsideHTMLIsLocked="false" -->
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
5
|
+
<title>dp.SyntaxHighlighter Tests</title>
|
6
|
+
<link type="text/css" rel="stylesheet" href="Styles/SyntaxHighlighter.css"></link>
|
7
|
+
<link href="Styles/TestPages.css" rel="stylesheet" type="text/css">
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body>
|
11
|
+
|
12
|
+
<h1>dp.SyntaxHighlighter 1.5.0 Tests and Samples</h1>
|
13
|
+
<p><a href="http://code.google.com/p/syntaxhighlighter/">http://code.google.com/p/syntaxhighlighter/</a></p>
|
14
|
+
|
15
|
+
<h2><!-- InstanceBeginEditable name="Title" -->Python<!-- InstanceEndEditable --></h2>
|
16
|
+
|
17
|
+
<div class="layout">
|
18
|
+
|
19
|
+
<div class="column1">
|
20
|
+
<h3>Languages:</h3>
|
21
|
+
<ol>
|
22
|
+
<li><a href="CSharp.html">C#</a></li>
|
23
|
+
<li><a href="CSS.html">CSS</a></li>
|
24
|
+
<li><a href="Cpp.html">C++</a></li>
|
25
|
+
<li><a href="Delphi.html">Delphi</a></li>
|
26
|
+
<li><a href="Java.html">Java</a></li>
|
27
|
+
<li><a href="JavaScript.html">JavaScript</a></li>
|
28
|
+
<li><a href="PHP.html">PHP</a></li>
|
29
|
+
<li><a href="Python.html">Python</a></li>
|
30
|
+
<li><a href="Ruby.html">Ruby</a></li>
|
31
|
+
<li><a href="SQL.html">SQL</a></li>
|
32
|
+
<li><a href="VB.html">Visual Basic</a></li>
|
33
|
+
<li><a href="XML.html">XML / HTML</a></li>
|
34
|
+
</ol>
|
35
|
+
<h3>Features:</h3>
|
36
|
+
<ol>
|
37
|
+
<li><a href="SmartTabs.html">Smart tabs</a></li>
|
38
|
+
<li><a href="FirstLine.html">First line</a> </li>
|
39
|
+
<li><a href="CollapseCode.html">Expand code</a></li>
|
40
|
+
<li><a href="ShowColumns.html">Show columns</a></li>
|
41
|
+
<li><a href="NoGutter.html">No gutter</a></li>
|
42
|
+
<li><a href="NoControls.html">No controls</a></li>
|
43
|
+
</ol>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div class="column2">
|
47
|
+
Text body before.
|
48
|
+
<hr/>
|
49
|
+
<!-- InstanceBeginEditable name="Code" -->
|
50
|
+
<pre name="code" class="python">
|
51
|
+
"""
|
52
|
+
Comment\"
|
53
|
+
string
|
54
|
+
"""
|
55
|
+
|
56
|
+
cache = {}
|
57
|
+
|
58
|
+
string s = "## comments inside a string"
|
59
|
+
string str = "helllo \"world\", how things?" + 10 + "word" + "hello" # and " some more here
|
60
|
+
|
61
|
+
def arrange(plans, lines, totalMinutes):
|
62
|
+
"""arrangements of plans taken lines times with an heuristic that the sum
|
63
|
+
of values in one arrangement is less then totalMinutes
|
64
|
+
"""
|
65
|
+
#if in cache we are done otherwise start calculating and save them to cache
|
66
|
+
if (plans, lines, totalMinutes) in cache:
|
67
|
+
return cache[(plans, lines, totalMinutes)]
|
68
|
+
if lines==1:
|
69
|
+
r = [[plan] for plan in plans]
|
70
|
+
cache[(plans, lines, totalMinutes)] = r
|
71
|
+
return r
|
72
|
+
solutions = []
|
73
|
+
for plan in plans:
|
74
|
+
for ar in sort(list(arrange(plans, lines-1, totalMinutes))):
|
75
|
+
try:
|
76
|
+
one_solution = tuple(sort([plan] + list(ar)))
|
77
|
+
if sum(one_solution) <= totalMinutes and one_solution not in solutions:
|
78
|
+
solutions.append(one_solution)
|
79
|
+
except Exception, e:
|
80
|
+
print "Error:", str(e)
|
81
|
+
cache[(plans, lines, totalMinutes)] = solutions
|
82
|
+
return solutions
|
83
|
+
|
84
|
+
if __name__ == "__main__":
|
85
|
+
import sys
|
86
|
+
lines, totalMinutes = int(sys.argv[1]), int(sys.argv[2])
|
87
|
+
plans = tuple([int(p) for p in sys.argv[3:]])
|
88
|
+
print "for", lines, totalMinutes, plans
|
89
|
+
for sol in arrange(plans, lines, totalMinutes):
|
90
|
+
print sol
|
91
|
+
</pre>
|
92
|
+
<!-- InstanceEndEditable -->
|
93
|
+
<hr/>
|
94
|
+
Text body after.
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div class="footer">
|
99
|
+
Copyright 2004-2007 Alex Gorbatchev.<br/>
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<script class="javascript" src="Scripts/shCore.js"></script>
|
103
|
+
<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
|
104
|
+
<script class="javascript" src="Scripts/shBrushPhp.js"></script>
|
105
|
+
<script class="javascript" src="Scripts/shBrushJScript.js"></script>
|
106
|
+
<script class="javascript" src="Scripts/shBrushJava.js"></script>
|
107
|
+
<script class="javascript" src="Scripts/shBrushVb.js"></script>
|
108
|
+
<script class="javascript" src="Scripts/shBrushSql.js"></script>
|
109
|
+
<script class="javascript" src="Scripts/shBrushXml.js"></script>
|
110
|
+
<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
|
111
|
+
<script class="javascript" src="Scripts/shBrushPython.js"></script>
|
112
|
+
<script class="javascript" src="Scripts/shBrushRuby.js"></script>
|
113
|
+
<script class="javascript" src="Scripts/shBrushCss.js"></script>
|
114
|
+
<script class="javascript" src="Scripts/shBrushCpp.js"></script>
|
115
|
+
<script class="javascript">
|
116
|
+
dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
|
117
|
+
dp.SyntaxHighlighter.HighlightAll('code');
|
118
|
+
</script>
|
119
|
+
|
120
|
+
</body>
|
121
|
+
<!-- InstanceEnd --></html>
|