Permalink
Browse files

Starting to write article with solutions to all problems from Colombi…

…an National Programming Contest 2011.
  • Loading branch information...
1 parent 2705189 commit d13ddcf6eded30518d039120bcb2fd03032f0d5f @andmej committed Oct 13, 2011
Showing with 12,288 additions and 0 deletions.
  1. +1 −0 Gemfile
  2. +2 −0 Gemfile.lock
  3. +4 −0 lib/colombian_programming_contests/Gemfile
  4. +74 −0 lib/colombian_programming_contests/Gemfile.lock
  5. BIN lib/colombian_programming_contests/assets/images/horner.png
  6. +59 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushAS3.js
  7. +75 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushAppleScript.js
  8. +59 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushBash.js
  9. +65 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushCSharp.js
  10. +100 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushColdFusion.js
  11. +97 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushCpp.js
  12. +91 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushCss.js
  13. +55 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushDelphi.js
  14. +41 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushDiff.js
  15. +52 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushErlang.js
  16. +67 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushGroovy.js
  17. +52 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushJScript.js
  18. +57 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushJava.js
  19. +58 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushJavaFX.js
  20. +72 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushPerl.js
  21. +88 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushPhp.js
  22. +33 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushPlain.js
  23. +74 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushPowerShell.js
  24. +64 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushPython.js
  25. +55 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushRuby.js
  26. +94 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushSass.js
  27. +51 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushScala.js
  28. +66 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushSql.js
  29. +56 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushVb.js
  30. +69 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shBrushXml.js
  31. +17 −0 lib/colombian_programming_contests/assets/javascripts/syntaxhighlighter/shCore.js
  32. +16 −0 lib/colombian_programming_contests/assets/stylesheets/fixes.css
  33. +190 −0 lib/colombian_programming_contests/assets/stylesheets/main.css
  34. +43 −0 lib/colombian_programming_contests/assets/stylesheets/reset.css
  35. +13 −0 lib/colombian_programming_contests/assets/stylesheets/style.css
  36. +226 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCore.css
  37. +328 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreDefault.css
  38. +331 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreDjango.css
  39. +339 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreEclipse.css
  40. +324 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreEmacs.css
  41. +328 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css
  42. +324 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreMDUltra.css
  43. +324 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreMidnight.css
  44. +324 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shCoreRDark.css
  45. +117 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeDefault.css
  46. +120 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeDjango.css
  47. +128 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeEclipse.css
  48. +113 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeEmacs.css
  49. +117 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css
  50. +113 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeMDUltra.css
  51. +113 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeMidnight.css
  52. +113 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeRDark.css
  53. +116 −0 lib/colombian_programming_contests/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.css
  54. +3 −0 lib/colombian_programming_contests/generate_guides.rb
  55. +91 −0 lib/colombian_programming_contests/generator.rb
  56. +29 −0 lib/colombian_programming_contests/helpers.rb
  57. +161 −0 lib/colombian_programming_contests/output/2011/index.html
  58. BIN lib/colombian_programming_contests/output/images/belongs_to.png
  59. BIN lib/colombian_programming_contests/output/images/book_icon.gif
  60. BIN lib/colombian_programming_contests/output/images/bullet.gif
  61. BIN lib/colombian_programming_contests/output/images/challenge.png
  62. BIN lib/colombian_programming_contests/output/images/chapters_icon.gif
  63. BIN lib/colombian_programming_contests/output/images/check_bullet.gif
  64. BIN lib/colombian_programming_contests/output/images/credits_pic_blank.gif
  65. BIN lib/colombian_programming_contests/output/images/csrf.png
  66. BIN lib/colombian_programming_contests/output/images/customized_error_messages.png
  67. BIN lib/colombian_programming_contests/output/images/edge_badge.png
  68. BIN lib/colombian_programming_contests/output/images/error_messages.png
  69. BIN lib/colombian_programming_contests/output/images/feature_tile.gif
  70. BIN lib/colombian_programming_contests/output/images/footer_tile.gif
  71. BIN lib/colombian_programming_contests/output/images/fxn.png
  72. BIN lib/colombian_programming_contests/output/images/grey_bullet.gif
  73. BIN lib/colombian_programming_contests/output/images/habtm.png
  74. BIN lib/colombian_programming_contests/output/images/has_many.png
  75. BIN lib/colombian_programming_contests/output/images/has_many_through.png
  76. BIN lib/colombian_programming_contests/output/images/has_one.png
  77. BIN lib/colombian_programming_contests/output/images/has_one_through.png
  78. BIN lib/colombian_programming_contests/output/images/header_backdrop.png
  79. BIN lib/colombian_programming_contests/output/images/header_tile.gif
  80. BIN lib/colombian_programming_contests/output/images/horner.png
  81. BIN lib/colombian_programming_contests/output/images/i18n/demo_localized_pirate.png
  82. BIN lib/colombian_programming_contests/output/images/i18n/demo_translated_en.png
  83. BIN lib/colombian_programming_contests/output/images/i18n/demo_translated_pirate.png
  84. BIN lib/colombian_programming_contests/output/images/i18n/demo_translation_missing.png
  85. BIN lib/colombian_programming_contests/output/images/i18n/demo_untranslated.png
  86. +5 −0 lib/colombian_programming_contests/output/images/icons/README
  87. BIN lib/colombian_programming_contests/output/images/icons/callouts/1.png
  88. BIN lib/colombian_programming_contests/output/images/icons/callouts/10.png
  89. BIN lib/colombian_programming_contests/output/images/icons/callouts/11.png
  90. BIN lib/colombian_programming_contests/output/images/icons/callouts/12.png
  91. BIN lib/colombian_programming_contests/output/images/icons/callouts/13.png
  92. BIN lib/colombian_programming_contests/output/images/icons/callouts/14.png
  93. BIN lib/colombian_programming_contests/output/images/icons/callouts/15.png
  94. BIN lib/colombian_programming_contests/output/images/icons/callouts/2.png
  95. BIN lib/colombian_programming_contests/output/images/icons/callouts/3.png
  96. BIN lib/colombian_programming_contests/output/images/icons/callouts/4.png
  97. BIN lib/colombian_programming_contests/output/images/icons/callouts/5.png
  98. BIN lib/colombian_programming_contests/output/images/icons/callouts/6.png
  99. BIN lib/colombian_programming_contests/output/images/icons/callouts/7.png
  100. BIN lib/colombian_programming_contests/output/images/icons/callouts/8.png
  101. BIN lib/colombian_programming_contests/output/images/icons/callouts/9.png
  102. BIN lib/colombian_programming_contests/output/images/icons/caution.png
  103. BIN lib/colombian_programming_contests/output/images/icons/example.png
  104. BIN lib/colombian_programming_contests/output/images/icons/home.png
  105. BIN lib/colombian_programming_contests/output/images/icons/important.png
  106. BIN lib/colombian_programming_contests/output/images/icons/next.png
  107. BIN lib/colombian_programming_contests/output/images/icons/note.png
  108. BIN lib/colombian_programming_contests/output/images/icons/prev.png
  109. BIN lib/colombian_programming_contests/output/images/icons/tip.png
  110. BIN lib/colombian_programming_contests/output/images/icons/up.png
  111. BIN lib/colombian_programming_contests/output/images/icons/warning.png
  112. BIN lib/colombian_programming_contests/output/images/jaimeiniesta.jpg
  113. BIN lib/colombian_programming_contests/output/images/nav_arrow.gif
  114. BIN lib/colombian_programming_contests/output/images/polymorphic.png
  115. BIN lib/colombian_programming_contests/output/images/posts_index.png
  116. BIN lib/colombian_programming_contests/output/images/radar.png
  117. BIN lib/colombian_programming_contests/output/images/rails_guides_logo.gif
  118. BIN lib/colombian_programming_contests/output/images/rails_logo_remix.gif
  119. BIN lib/colombian_programming_contests/output/images/rails_welcome.png
  120. BIN lib/colombian_programming_contests/output/images/session_fixation.png
  121. BIN lib/colombian_programming_contests/output/images/tab_grey.gif
  122. BIN lib/colombian_programming_contests/output/images/tab_info.gif
  123. BIN lib/colombian_programming_contests/output/images/tab_note.gif
  124. BIN lib/colombian_programming_contests/output/images/tab_red.gif
  125. BIN lib/colombian_programming_contests/output/images/tab_yellow.gif
  126. BIN lib/colombian_programming_contests/output/images/tab_yellow.png
  127. BIN lib/colombian_programming_contests/output/images/validation_error_messages.png
  128. BIN lib/colombian_programming_contests/output/images/vijaydev.jpg
  129. +7 −0 lib/colombian_programming_contests/output/javascripts/guides.js
  130. +59 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushAS3.js
  131. +75 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushAppleScript.js
  132. +59 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushBash.js
  133. +65 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushCSharp.js
  134. +100 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushColdFusion.js
  135. +97 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushCpp.js
  136. +91 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushCss.js
  137. +55 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushDelphi.js
  138. +41 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushDiff.js
  139. +52 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushErlang.js
  140. +67 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushGroovy.js
  141. +52 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushJScript.js
  142. +57 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushJava.js
  143. +58 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushJavaFX.js
  144. +72 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushPerl.js
  145. +88 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushPhp.js
  146. +33 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushPlain.js
  147. +74 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushPowerShell.js
  148. +64 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushPython.js
  149. +55 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushRuby.js
  150. +94 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushSass.js
  151. +51 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushScala.js
  152. +66 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushSql.js
  153. +56 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushVb.js
  154. +69 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shBrushXml.js
  155. +17 −0 lib/colombian_programming_contests/output/javascripts/syntaxhighlighter/shCore.js
  156. +80 −0 lib/colombian_programming_contests/output/layout.html
  157. +16 −0 lib/colombian_programming_contests/output/stylesheets/fixes.css
  158. +190 −0 lib/colombian_programming_contests/output/stylesheets/main.css
  159. +52 −0 lib/colombian_programming_contests/output/stylesheets/print.css
  160. +43 −0 lib/colombian_programming_contests/output/stylesheets/reset.css
  161. +13 −0 lib/colombian_programming_contests/output/stylesheets/style.css
  162. +226 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCore.css
  163. +328 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreDefault.css
  164. +331 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreDjango.css
  165. +339 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreEclipse.css
  166. +324 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreEmacs.css
  167. +328 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css
  168. +324 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreMDUltra.css
  169. +324 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreMidnight.css
  170. +324 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shCoreRDark.css
  171. +117 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeDefault.css
  172. +120 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeDjango.css
  173. +128 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeEclipse.css
  174. +113 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeEmacs.css
  175. +117 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css
  176. +113 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeMDUltra.css
  177. +113 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeMidnight.css
  178. +113 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeRDark.css
  179. +116 −0 lib/colombian_programming_contests/output/stylesheets/syntaxhighlighter/shThemeRailsGuides.css
  180. +34 −0 lib/colombian_programming_contests/source/2011/d.cpp
  181. +51 −0 lib/colombian_programming_contests/source/2011/index.md
  182. +40 −0 lib/colombian_programming_contests/source/layout.html.erb
View
@@ -13,6 +13,7 @@ gem 'augustl-redclothcoderay', :require => 'redclothcoderay'
gem 'authlogic'
gem 'paperclip'
gem 'active_scaffold', :git => 'git://github.com/activescaffold/active_scaffold.git', :branch => 'rails-3.0'
+gem 'redcarpet', '~> 2.0.0b5'
group :test, :development do
gem "rspec-rails", "~> 2.6"
View
@@ -101,6 +101,7 @@ GEM
rake (>= 0.8.7)
thor (~> 0.14.4)
rake (0.9.2)
+ redcarpet (2.0.0b5)
render_component_vho (3.0.3)
railties (~> 3.0.0)
rspec (2.6.0)
@@ -146,5 +147,6 @@ DEPENDENCIES
mysql2 (~> 0.2.11)
paperclip
rails (= 3.0.6)
+ redcarpet (~> 2.0.0b5)
rspec-rails (~> 2.6)
twitter
@@ -0,0 +1,4 @@
+source 'http://rubygems.org'
+
+gem 'redcarpet', '~> 2.0.0b5'
+gem 'rails', '3.0.6'
@@ -0,0 +1,74 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.6)
+ actionpack (= 3.0.6)
+ mail (~> 2.2.15)
+ actionpack (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.6)
+ activesupport (= 3.0.6)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.6)
+ activemodel (= 3.0.6)
+ activesupport (= 3.0.6)
+ activesupport (3.0.6)
+ arel (2.0.10)
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ polyglot (0.3.2)
+ rack (1.2.4)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.6)
+ actionmailer (= 3.0.6)
+ actionpack (= 3.0.6)
+ activerecord (= 3.0.6)
+ activeresource (= 3.0.6)
+ activesupport (= 3.0.6)
+ bundler (~> 1.0)
+ railties (= 3.0.6)
+ railties (3.0.6)
+ actionpack (= 3.0.6)
+ activesupport (= 3.0.6)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.9.2)
+ redcarpet (2.0.0b5)
+ thor (0.14.6)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.30)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails (= 3.0.6)
+ redcarpet (~> 2.0.0b5)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // Created by Peter Atoria @ http://iAtoria.com
+
+ var inits = 'class interface function package';
+
+ var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
+ 'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
+ 'extends false final finally flash_proxy for get if implements import in include Infinity ' +
+ 'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
+ 'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
+ 'return set static String super switch this throw true try typeof uint undefined unescape ' +
+ 'use void while with'
+ ;
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
+ { regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
+ { regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['actionscript3', 'as3'];
+
+ SyntaxHighlighter.brushes.AS3 = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
@@ -0,0 +1,75 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ // AppleScript brush by David Chambers
+ // http://davidchambersdesign.com/
+ var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
+ var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle';
+ var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes';
+
+ this.regexList = [
+
+ { regex: /(--|#).*$/gm,
+ css: 'comments' },
+
+ { regex: /\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm, // support nested comments
+ css: 'comments' },
+
+ { regex: /"[\s\S]*?"/gm,
+ css: 'string' },
+
+ { regex: /(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g,
+ css: 'color1' },
+
+ { regex: /(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g, // numbers
+ css: 'color1' },
+
+ { regex: /(?:&(amp;|gt;|lt;)?|=||>|<||>=||<=|\*|\+|-|\/|÷|\^)/g,
+ css: 'color2' },
+
+ { regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
+ css: 'keyword' },
+
+ { regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals
+ css: 'keyword' },
+
+ { regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
+ css: 'color3' },
+
+ { regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
+ css: 'color3' },
+
+ { regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' },
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
+ { regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' }
+ ];
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['applescript'];
+
+ SyntaxHighlighter.brushes.AppleScript = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
@@ -0,0 +1,59 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne ge le';
+ var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
+ 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
+ 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
+ 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
+ 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
+ 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
+ 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
+ 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
+ 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
+ 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
+ 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
+ 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
+ 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
+ 'vi watch wc whereis which who whoami Wget xargs yes'
+ ;
+
+ this.regexList = [
+ { regex: /^#!.*$/gm, css: 'preprocessor bold' },
+ { regex: /\/[\w-\/]+/gm, css: 'plain' },
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
+ { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands
+ ];
+ }
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['bash', 'shell'];
+
+ SyntaxHighlighter.brushes.Bash = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
@@ -0,0 +1,65 @@
+/**
+ * SyntaxHighlighter
+ * http://alexgorbatchev.com/SyntaxHighlighter
+ *
+ * SyntaxHighlighter is donationware. If you are using it, please donate.
+ * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
+ *
+ * @version
+ * 3.0.83 (July 02 2010)
+ *
+ * @copyright
+ * Copyright (C) 2004-2010 Alex Gorbatchev.
+ *
+ * @license
+ * Dual licensed under the MIT and GPL licenses.
+ */
+;(function()
+{
+ // CommonJS
+ typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
+
+ function Brush()
+ {
+ var keywords = 'abstract as base bool break byte case catch char checked class const ' +
+ 'continue decimal default delegate do double else enum event explicit ' +
+ 'extern false finally fixed float for foreach get goto if implicit in int ' +
+ 'interface internal is lock long namespace new null object operator out ' +
+ 'override params private protected public readonly ref return sbyte sealed set ' +
+ 'short sizeof stackalloc static string struct switch this throw true try ' +
+ 'typeof uint ulong unchecked unsafe ushort using virtual void while';
+
+ function fixComments(match, regexInfo)
+ {
+ var css = (match[0].indexOf("///") == 0)
+ ? 'color1'
+ : 'comments'
+ ;
+
+ return [new SyntaxHighlighter.Match(match[0], match.index, css)];
+ }
+
+ this.regexList = [
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, func : fixComments }, // one line comments
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: /@"(?:[^"]|"")*"/g, css: 'string' }, // @-quoted strings
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
+ { regex: /^\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // c# keyword
+ { regex: /\bpartial(?=\s+(?:class|interface|struct)\b)/g, css: 'keyword' }, // contextual keyword: 'partial'
+ { regex: /\byield(?=\s+(?:return|break)\b)/g, css: 'keyword' } // contextual keyword: 'yield'
+ ];
+
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['c#', 'c-sharp', 'csharp'];
+
+ SyntaxHighlighter.brushes.CSharp = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();
+
Oops, something went wrong.

0 comments on commit d13ddcf

Please sign in to comment.