Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding files

  • Loading branch information...
commit 8d0bfa8caa8861402159717dfe99ed4dbfde1286 1 parent 602942a
admin authored

Showing 102 changed files with 9,351 additions and 0 deletions. Show diff stats Hide diff stats

  1. +29 0 LICENSE
  2. +17 0 README
  3. +54 0 Rakefile
  4. +47 0 bin/build_all.rb
  5. +5 0 bin/postprocess_all.rb
  6. +7 0 bin/pressie.rb
  7. +7 0 code/Examples/day_1/time_machine_1.rb
  8. +10 0 code/Examples/day_1/time_machine_2.rb
  9. +13 0 code/Examples/day_1/time_machine_3.rb
  10. +8 0 code/Examples/day_1/time_machine_4.rb
  11. +5 0 code/Examples/day_1/time_machine_5.rb
  12. +61 0 code/Examples/day_2/array_basics.rb
  13. +4 0 code/Examples/day_2/array_example_1.rb
  14. +26 0 code/Examples/day_2/block_simple.rb
  15. +1 0  code/Examples/day_2/course_0.rb
  16. +7 0 code/Examples/day_2/course_1.rb
  17. +5 0 code/Examples/day_2/course_2.rb
  18. +10 0 code/Examples/day_2/course_3.rb
  19. +22 0 code/Examples/day_2/hash_basics.rb
  20. +3 0  code/Examples/day_2/months.rb
  21. 0  code/Examples/day_2/symboles.rb
  22. +11 0 code/control/basic_continuation.rb
  23. +59 0 code/control/cc_throw_catch.rb
  24. +8 0 code/control/closure_continuation.rb
  25. +12 0 code/control/closure_continuation_2.rb
  26. +115 0 dp.SyntaxHighlighter/CSS.html
  27. +134 0 dp.SyntaxHighlighter/CSharp.html
  28. +90 0 dp.SyntaxHighlighter/CollapseCode.html
  29. +190 0 dp.SyntaxHighlighter/Cpp.html
  30. +108 0 dp.SyntaxHighlighter/CrashTest.html
  31. +112 0 dp.SyntaxHighlighter/Delphi.html
  32. +90 0 dp.SyntaxHighlighter/FirstLine.html
  33. +80 0 dp.SyntaxHighlighter/Index.html
  34. +122 0 dp.SyntaxHighlighter/Java.html
  35. +112 0 dp.SyntaxHighlighter/JavaScript.html
  36. +89 0 dp.SyntaxHighlighter/NoControls.html
  37. +89 0 dp.SyntaxHighlighter/NoGutter.html
  38. +102 0 dp.SyntaxHighlighter/PHP.html
  39. +121 0 dp.SyntaxHighlighter/Python.html
  40. +131 0 dp.SyntaxHighlighter/Ruby.html
  41. +98 0 dp.SyntaxHighlighter/SQL.html
  42. BIN  dp.SyntaxHighlighter/Scripts/clipboard.swf
  43. +32 0 dp.SyntaxHighlighter/Scripts/shBrushCSharp.js
  44. +73 0 dp.SyntaxHighlighter/Scripts/shBrushCpp.js
  45. +52 0 dp.SyntaxHighlighter/Scripts/shBrushCss.js
  46. +34 0 dp.SyntaxHighlighter/Scripts/shBrushDelphi.js
  47. +22 0 dp.SyntaxHighlighter/Scripts/shBrushJScript.js
  48. +28 0 dp.SyntaxHighlighter/Scripts/shBrushJava.js
  49. +60 0 dp.SyntaxHighlighter/Scripts/shBrushPhp.js
  50. +30 0 dp.SyntaxHighlighter/Scripts/shBrushPython.js
  51. +28 0 dp.SyntaxHighlighter/Scripts/shBrushRuby.js
  52. +42 0 dp.SyntaxHighlighter/Scripts/shBrushSql.js
  53. +29 0 dp.SyntaxHighlighter/Scripts/shBrushVb.js
  54. +70 0 dp.SyntaxHighlighter/Scripts/shBrushXml.js
  55. +414 0 dp.SyntaxHighlighter/Scripts/shCore.js
  56. +674 0 dp.SyntaxHighlighter/Scripts/shCore.uncompressed.js
  57. +89 0 dp.SyntaxHighlighter/ShowColumns.html
  58. +88 0 dp.SyntaxHighlighter/SmartTabs.html
  59. +158 0 dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css
  60. +63 0 dp.SyntaxHighlighter/Styles/TestPages.css
  61. +80 0 dp.SyntaxHighlighter/Templates/Test.dwt
  62. +115 0 dp.SyntaxHighlighter/VB.html
  63. +136 0 dp.SyntaxHighlighter/XML.html
  64. BIN  html.zip
  65. +968 0 html/all.html
  66. +110 0 html/building.html
  67. +433 0 html/day_1.html
  68. +449 0 html/day_2.html
  69. +59 0 html/day_3.html
  70. +59 0 html/day_4.html
  71. +59 0 html/day_5.html
  72. +319 0 html/example.html
  73. +203 0 html/including_code.html
  74. +156 0 html/outline.html
  75. +71 0 html/table_of_contents.html
  76. +160 0 lib/pressie/content.rb
  77. +106 0 lib/pressie/pressie.rb
  78. +196 0 lib/stylesheets/pressie.css
  79. +149 0 lib/stylesheets/print.css
  80. BIN  lib/stylesheets/ruby.png
  81. +27 0 slides/building.slides
  82. +169 0 slides/day_1.slides
  83. +165 0 slides/day_2.slides
  84. 0  slides/day_3.slides
  85. 0  slides/day_4.slides
  86. 0  slides/day_5.slides
  87. +80 0 slides/example.slides
  88. +80 0 slides/including_code.slides
  89. +4 0 slides/metadata.yml
  90. +51 0 slides/outline.slides
  91. +8 0 slides/table_of_contents.slides
  92. BIN  ui/default/blank.gif
  93. BIN  ui/default/bodybg.gif
  94. +23 0 ui/default/framing.css
  95. +42 0 ui/default/iepngfix.htc
  96. +7 0 ui/default/opera.css
  97. +15 0 ui/default/outline.css
  98. +86 0 ui/default/pretty.css
  99. +1 0  ui/default/print.css
  100. +9 0 ui/default/s5-core.css
  101. +3 0  ui/default/slides.css
  102. +553 0 ui/default/slides.js
29 LICENSE
... ... @@ -0,0 +1,29 @@
  1 +This source tree contains a mixture of original material and other people's work. In particular,
  2 +it contains Syntax Highlighting code from http://code.google.com/p/syntaxhighlighter/ and
  3 +the S5 package from http://meyerweb.com/eric/tools/s5/. Both of these packages carry their own licenses,
  4 +and the conditions in this file do not apply to these packages.
  5 +
  6 +The following terms apply to the original code in this source tree:
  7 +
  8 +Copyright (c) 2008 Dave Thomas
  9 +
  10 +Permission is hereby granted, free of charge, to any person
  11 +obtaining a copy of this software and associated documentation
  12 +files (the "Software"), to deal in the Software without
  13 +restriction, including without limitation the rights to use,
  14 +copy, modify, merge, publish, distribute, sublicense, and/or sell
  15 +copies of the Software, and to permit persons to whom the
  16 +Software is furnished to do so, subject to the following
  17 +conditions:
  18 +
  19 +The above copyright notice and this permission notice shall be
  20 +included in all copies or substantial portions of the Software.
  21 +
  22 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23 +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  24 +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25 +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  26 +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  27 +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  28 +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  29 +OTHER DEALINGS IN THE SOFTWARE.
17 README
... ... @@ -0,0 +1,17 @@
  1 +This is a remarkably trivial package that makes simply HTML-based presentations from
  2 +a set up source files written using Textile. It's designed to help when creating
  3 +slides that contain lots of code, as it allows code to be embedded from external source files.
  4 +This means that the code that you embed can come from running (and tested) programs.
  5 +
  6 +The code in the resulting slides is syntax highlighted, and is hyperlinked to the original
  7 +source file, allowing that file to be brought up in Textmate.
  8 +
  9 +To get started
  10 +
  11 +* make sure you have Ruby 1.8.6 installed, along with the Rake and redcloth gems
  12 +* type 'rake all' in the same directory as this README file
  13 +* open html/all.html
  14 +
  15 +
  16 +See the file LICENSE for details on how this all may be used.
  17 +
54 Rakefile
... ... @@ -0,0 +1,54 @@
  1 +SLIDES_DIR = 'slides/'
  2 +HTML_DIR = 'html/'
  3 +ALL_HTML = File.join(HTML_DIR, "all.html")
  4 +
  5 +METADATA = File.join(SLIDES_DIR, "metadata.yml")
  6 +
  7 +Dir.chdir(SLIDES_DIR) { SRC = FileList['*.slides']; SRC.resolve }
  8 +
  9 +OUTPUT = []
  10 +
  11 +SRC.each do |file_name|
  12 + slide_file = File.join(SLIDES_DIR, file_name)
  13 + html_file = File.join(HTML_DIR, file_name.ext('.html'))
  14 + OUTPUT << html_file
  15 + desc "Build #{html_file} from #{slide_file}"
  16 + file html_file => [HTML_DIR, slide_file] do
  17 + sh "ruby bin/pressie.rb #{METADATA} #{slide_file} > #{html_file}"
  18 + end
  19 +end
  20 +
  21 +desc "Build the HTML slides from all the files slides/*.slides files"
  22 +task :default => OUTPUT
  23 +
  24 +desc "Build all slides based on the contents of slides/table_of_contents.slides"
  25 +task :all => [ 'tmp/', HTML_DIR, ALL_HTML, :remove_tmp ]
  26 +
  27 +task ALL_HTML => 'tmp/almost_all.html' do
  28 + sh "ruby bin/postprocess_all.rb tmp/almost_all.html >#{ALL_HTML}"
  29 +end
  30 +
  31 +task 'tmp/almost_all.html' => 'tmp/almost_all.slides' do
  32 + sh "ruby bin/pressie.rb #{METADATA} tmp/almost_all.slides >tmp/almost_all.html"
  33 +end
  34 +
  35 +task 'tmp/almost_all.slides' => OUTPUT do
  36 + sh "ruby bin/build_all.rb #{METADATA} slides/table_of_contents.slides tmp/almost_all.slides"
  37 +end
  38 +
  39 +file "tmp/" do
  40 + mkdir "tmp"
  41 +end
  42 +
  43 +file "html/" do
  44 + mkdir "html"
  45 +end
  46 +
  47 +task :remove_tmp do
  48 + FileUtils.rm_rf("tmp")
  49 +end
  50 +
  51 +desc "Remove all work products—slides and temporary files"
  52 +task :clean => :remove_tmp do
  53 + FileUtils.rm_rf HTML_DIR
  54 +end
47 bin/build_all.rb
... ... @@ -0,0 +1,47 @@
  1 +# We're passed a file containing hyperlinks to the HTML
  2 +# (ie, table_con_contents.slides)
  3 +# and contruct all.slides from it
  4 +require 'yaml'
  5 +
  6 +def usage(msg = nil)
  7 + STDERR.puts "#{__FILE__} metadata contents output"
  8 + if msg
  9 + STDERR.puts
  10 + STDERR.puts msg
  11 + end
  12 + exit 1
  13 +end
  14 +
  15 +BASE = File.join(File.dirname(__FILE__), "..")
  16 +
  17 +metadata_name = ARGV.shift || usage("Missing metadata")
  18 +contents_name = ARGV.shift || usage("Missing table of contents file name")
  19 +op_name = ARGV.shift || usage("Missing output file name")
  20 +
  21 +metadata = YAML.load_file(metadata_name)
  22 +
  23 +contents = File.readlines(contents_name).
  24 + grep(/^\*.*:(.*)\.html/) { File.join(BASE, "slides", "#{$1}.slides") }.
  25 + map {|name| File.read(name) }
  26 +
  27 +File.open(op_name, "w") do |op|
  28 +
  29 + op.puts "h1. #{metadata['title']}\n\n"
  30 + op.puts "bq. #{metadata['author']}\n\n"
  31 +
  32 + op.puts "h1. Contents\n\n"
  33 +
  34 + op.puts %{<div style="font-size: 70%">\n\n}
  35 +
  36 + contents.each do |content|
  37 + content =~ /h1.\s+(.*)/
  38 + STDERR.puts $1
  39 + op.puts "* #{$1}\n\n"
  40 + end
  41 +
  42 + op.puts "</div>\n\n"
  43 +
  44 + contents.each do |content|
  45 + op.puts content.sub(/h1/, 'h1(slide0)').sub(/__END__.*/m, '')
  46 + end
  47 +end
5 bin/postprocess_all.rb
... ... @@ -0,0 +1,5 @@
  1 +content = File.read(ARGV[0])
  2 +
  3 +content = content.gsub(/<div class="slide">\s+<h1 class="slide0"/m, %{<div class="title slide">\n<h1})
  4 +
  5 +puts content
7 bin/pressie.rb
... ... @@ -0,0 +1,7 @@
  1 +base = File.join(File.dirname(__FILE__), "..")
  2 +$: << File.join(base, "lib")
  3 +
  4 +require 'rubygems'
  5 +require "pressie/pressie"
  6 +
  7 +Pressie::process
7 code/Examples/day_1/time_machine_1.rb
... ... @@ -0,0 +1,7 @@
  1 +class TimeMachine
  2 + def initialize
  3 + time = Time.now
  4 + puts time
  5 + end
  6 +end
  7 +TimeMachine.new
10 code/Examples/day_1/time_machine_2.rb
... ... @@ -0,0 +1,10 @@
  1 +class TimeMachine
  2 + def initialize
  3 + time = Time.now
  4 + end
  5 + puts time
  6 + #this will cause a NameError
  7 + #time_machine.rb:5:
  8 + #undefined local variable or method `time' for TimeMachine:Class (NameError)
  9 +end
  10 +TimeMachine.new
13 code/Examples/day_1/time_machine_3.rb
... ... @@ -0,0 +1,13 @@
  1 +class TimeMachine
  2 + def initialize
  3 + @time = Time.now
  4 + end
  5 +
  6 + def show_the_time
  7 + puts @time
  8 + end
  9 +
  10 + #this will work but
  11 +end
  12 +t = TimeMachine.new
  13 +t.show_the_time
8 code/Examples/day_1/time_machine_4.rb
... ... @@ -0,0 +1,8 @@
  1 +class TimeMachine
  2 + def initialize
  3 + @time = Time.now
  4 + end
  5 + puts @time
  6 +
  7 + #this will work but
  8 +end
5 code/Examples/day_1/time_machine_5.rb
... ... @@ -0,0 +1,5 @@
  1 +class TimeMachine
  2 + time = Time.now
  3 + puts time
  4 +end
  5 +
61 code/Examples/day_2/array_basics.rb
... ... @@ -0,0 +1,61 @@
  1 +
  2 +#START:basics
  3 +
  4 +array = []
  5 +# or
  6 +array = Array.new
  7 +
  8 +#END:basics
  9 +
  10 +#START:add
  11 +
  12 +arr = []
  13 +arr << 1
  14 +arr << 2
  15 +arr
  16 +#=> [1,2]
  17 +
  18 +#END:add
  19 +
  20 +#START:remove
  21 +
  22 +arr = [1,2,3] #this is another way to create and intialize an array
  23 +arr
  24 +#=> [1,2,3]
  25 +arr.delete(1)
  26 +arr
  27 +#=> [2,3]
  28 +
  29 +#END:remove
  30 +
  31 +#START:months
  32 +months = %w[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec]
  33 +months.size
  34 +#=>12
  35 +#END:months
  36 +
  37 +
  38 +#START:iter_blocks
  39 +
  40 +months = %w[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec]
  41 +months.each {|month| print month , " "}
  42 +#we will talk more about blocks tommorow
  43 +
  44 +#END:iter_blocks
  45 +
  46 +#START:array_merge
  47 +quarter_1 = [1000,2299,1443]
  48 +quarter_2 = [1300,2480,1100]
  49 +quarter_3 = [1300,2480,1100]
  50 +quarter_4 = [1590,2280,1200]
  51 +year = quarter_1 + quarter_2 + quarter_3 + quarter_4
  52 +#END:array_merge
  53 +
  54 +
  55 +#START:iterations
  56 +for i in 1..12 do
  57 + print months[i] , " "
  58 +end
  59 +#END:iterartions
  60 +
  61 +
4 code/Examples/day_2/array_example_1.rb
... ... @@ -0,0 +1,4 @@
  1 +arr = []
  2 +arr[40] = 1
  3 +
  4 +arr[-1] = 20
26 code/Examples/day_2/block_simple.rb
... ... @@ -0,0 +1,26 @@
  1 +#START:simple_block
  2 +def sayIntroduction
  3 +puts "Hi, my name is Yoni."
  4 +end
  5 +3.times { sayIntroduction }
  6 +#END:simple_block
  7 +
  8 +#START:method_blocks
  9 +def do_ten_times
  10 + if block_given?
  11 + 10.times{|i| yield(i)}
  12 + else
  13 + puts "no block given"
  14 + end
  15 +end
  16 +
  17 +do_ten_times
  18 +# no block given
  19 +
  20 +do_ten_times {|i| (1..i).each {print '*'}; puts("")}
  21 +
  22 +#END:method_blocks
  23 +
  24 +#START:task
  25 +
  26 +#END:task
1  code/Examples/day_2/course_0.rb
... ... @@ -0,0 +1 @@
  1 +3.times { print "Good morning; " }
7 code/Examples/day_2/course_1.rb
... ... @@ -0,0 +1,7 @@
  1 +course_1 = 90
  2 +course_2 = 80
  3 +course_3 = 87
  4 +course_4 = 95
  5 +
  6 +avarage = (course_1 + course_2 + course_3 + course_4) / 4
  7 +puts avarage
5 code/Examples/day_2/course_2.rb
... ... @@ -0,0 +1,5 @@
  1 +courses = []
  2 +courses[0] = 90
  3 +courses[1] = 80
  4 +courses[2] = 87
  5 +courses[3] = 95
10 code/Examples/day_2/course_3.rb
... ... @@ -0,0 +1,10 @@
  1 +courses = []
  2 +courses[0] = 90
  3 +courses[1] = 80
  4 +courses[2] = 87
  5 +courses[3] = 95
  6 +
  7 +courses.sort
  8 +courses << 100
  9 +courses << 62
  10 +puts courses
22 code/Examples/day_2/hash_basics.rb
... ... @@ -0,0 +1,22 @@
  1 +#START:person_hash
  2 +def print_person( person = {})
  3 + print "#{person["title"]} #{person["first_name"]} #{person["last_name"]} lives in #{person["city"]}"
  4 +end
  5 +
  6 +person = Hash.new
  7 +person["last_name"] = "Adam"
  8 +person["first_name"] = "Zvi"
  9 +person["title"] = "Dr."
  10 +person["city"] = "Hertzliya"
  11 +#END:person_hash
  12 +
  13 +#START:hash_keys
  14 +person = {"last_name" => "Adam",
  15 + "first_name" => "Zvi",
  16 + "title" => "Dr.",
  17 + "city" => "Hertzliya"}
  18 +person.keys
  19 +#=> ["city", "title", "first_name", "last_name"]
  20 +person.values
  21 +#=> ["Hertzliya", "Dr.", "Zvi", "Adam"]
  22 +#END:hash_keys
3  code/Examples/day_2/months.rb
... ... @@ -0,0 +1,3 @@
  1 +months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
  2 +months.size
  3 +#=>12
0  code/Examples/day_2/symboles.rb
No changes.
11 code/control/basic_continuation.rb
... ... @@ -0,0 +1,11 @@
  1 +def open_box(continuation)
  2 + continuation.call if rand < 0.5
  3 +end
  4 +
  5 +callcc do |continuation|
  6 + puts "opening box"
  7 + open_box(continuation)
  8 + puts "Phew--kitty's OK"
  9 +end
  10 +
  11 +puts "closing box"
59 code/control/cc_throw_catch.rb
... ... @@ -0,0 +1,59 @@
  1 +#START:stack
  2 +class CatchStack
  3 + Frame = Struct.new(:symbol, :cc)
  4 +
  5 + def stack
  6 + Thread.current[:catch_stack] ||= []
  7 + end
  8 +
  9 + def wrap(symbol, cc)
  10 + stack << Frame.new(symbol, cc)
  11 + begin
  12 + yield
  13 + ensure
  14 + stack.pop
  15 + end
  16 + end
  17 +
  18 + def find_continuation_for(symbol)
  19 + stack.pop until stack.empty? || stack.last.symbol == symbol
  20 + if stack.empty?
  21 + fail NameError, "uncaught throw `#{sym}'"
  22 + else
  23 + stack.pop.cc
  24 + end
  25 + end
  26 +end
  27 +#END:stack
  28 +
  29 +#START:CC
  30 +module CC
  31 + CATCH_STACK = CatchStack.new
  32 +
  33 + def self.catch(sym)
  34 + callcc do |cc|
  35 + CATCH_STACK.wrap(sym, cc) do
  36 + yield
  37 + end
  38 + end
  39 + end
  40 +
  41 + def self.throw(sym, value=nil)
  42 + cc = CATCH_STACK.find_continuation_for(sym)
  43 + cc.call(value)
  44 + end
  45 +end
  46 +#END:CC
  47 +
  48 +#START:body
  49 +def test_method
  50 + CC.throw(:x, "thrown X") if rand < 0.5
  51 +end
  52 +
  53 +result = CC.catch(:x) do
  54 + test_method
  55 + "normal exit"
  56 + end
  57 +
  58 +puts "Result is #{result}"
  59 +#END:body
8 code/control/closure_continuation.rb
... ... @@ -0,0 +1,8 @@
  1 +def create_continuation(arg)
  2 + callcc { |continuation| return continuation }
  3 + puts "Back in method: arg = #{arg}"
  4 + exit
  5 +end
  6 +
  7 +cont_one = create_continuation(123)
  8 +cont_one.call #=> Back in method: arg = 123
12 code/control/closure_continuation_2.rb
... ... @@ -0,0 +1,12 @@
  1 +def create_continuation(arg)
  2 + callcc { |continuation| return continuation }
  3 + puts "Back in method: arg = #{arg}"
  4 +end
  5 +
  6 +cont_one = create_continuation(123)
  7 +cont_one.call
  8 +
  9 +### Results in:
  10 +#
  11 +# Back in method: arg = 123
  12 +# closure_continuation_2.rb:8: undefined method `call' for nil:NilClass
115 dp.SyntaxHighlighter/CSS.html
... ... @@ -0,0 +1,115 @@
  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" -->CSS<!-- 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="css">
  51 +/* Main style for the table */
  52 +
  53 +.dp-highlighter
  54 +{
  55 + font-family: "Courier New", Courier, mono;
  56 + font-size: 12px;
  57 + text-align: left;
  58 + border: 1px solid #2B91AF;
  59 + background-color: #fff;
  60 + width: 99%;
  61 + overflow: auto;
  62 + line-height: 100% !important;
  63 + margin: 18px 0px 18px 0px;
  64 +}
  65 +
  66 +.dp-highlighter ol
  67 +{
  68 + margin: 0px 0px 0px 45px;
  69 + padding: 0px;
  70 + color: #2B91AF;
  71 +}
  72 +
  73 +.dp-highlighter ol li
  74 +{
  75 + border-left: 3px solid #6CE26C;
  76 + border-bottom: 1px solid #eee;
  77 + background-color: #fff;
  78 + padding-left: 10px;
  79 +}
  80 +
  81 +.dp-highlighter ol li.alt
  82 +{
  83 + background-color: #f8f8f8;
  84 +}
  85 +</pre>
  86 +<!-- InstanceEndEditable -->
  87 +<hr/>
  88 +Text body after.
  89 +</div>
  90 +</div>
  91 +
  92 +<div class="footer">
  93 +Copyright 2004-2007 Alex Gorbatchev.<br/>
  94 +</div>
  95 +
  96 +<script class="javascript" src="Scripts/shCore.js"></script>
  97 +<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
  98 +<script class="javascript" src="Scripts/shBrushPhp.js"></script>
  99 +<script class="javascript" src="Scripts/shBrushJScript.js"></script>
  100 +<script class="javascript" src="Scripts/shBrushJava.js"></script>
  101 +<script class="javascript" src="Scripts/shBrushVb.js"></script>
  102 +<script class="javascript" src="Scripts/shBrushSql.js"></script>
  103 +<script class="javascript" src="Scripts/shBrushXml.js"></script>
  104 +<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
  105 +<script class="javascript" src="Scripts/shBrushPython.js"></script>
  106 +<script class="javascript" src="Scripts/shBrushRuby.js"></script>
  107 +<script class="javascript" src="Scripts/shBrushCss.js"></script>
  108 +<script class="javascript" src="Scripts/shBrushCpp.js"></script>
  109 +<script class="javascript">
  110 +dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
  111 +dp.SyntaxHighlighter.HighlightAll('code');
  112 +</script>
  113 +
  114 +</body>
  115 +<!-- InstanceEnd --></html>
134 dp.SyntaxHighlighter/CSharp.html
... ... @@ -0,0 +1,134 @@
  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" -->C#<!-- 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="c-sharp">
  51 +string url = "&lt;a href=\"" + someObj.getUrl() + "\" target=\"_blank\">";
  52 +
  53 +// single line comments
  54 +// second single line
  55 +override protected void OnLoad(EventArgs e)
  56 +{
  57 + if(Attributes["class"] != null)
  58 + {
  59 + //_year.CssClass = _month.CssClass = _day.CssClass = Attributes["class"];
  60 + }
  61 + base.OnLoad(e);
  62 +}
  63 +
  64 +/***********************************
  65 + ** Multiline block comments
  66 + **********************************/
  67 +
  68 +/// &lt;summary>
  69 +/// Gets or sets currently selected date of birth or &lt;see cref="DateTime.MinValue"/> if selection is incomplete or invalid.
  70 +/// &lt;/summary>
  71 +public DateTime Date
  72 +{
  73 + String stringWithUrl = "http://blog.dreamprojections.com";
  74 +
  75 + get
  76 + {
  77 + #region Hello world /* shouldn't be a comment */
  78 + try
  79 + {
  80 + /*
  81 + DateTime result = new DateTime(
  82 + int.Parse(_year.SelectedItem.Value),
  83 +// int.Parse(_month.SelectedItem.Value),
  84 + int.Parse(_day.SelectedItem.Value)
  85 + );
  86 +
  87 + i *= 2;
  88 + */
  89 + return result;
  90 + }
  91 + catch
  92 + {
  93 + /* return _minDate; */
  94 + }
  95 + #endregion
  96 + }
  97 + set
  98 + {
  99 + Day = value.Day;
  100 + Month = value.Month;
  101 + Year = value.Year;
  102 + }
  103 +}
  104 +</pre>
  105 +<!-- InstanceEndEditable -->
  106 +<hr/>
  107 +Text body after.
  108 +</div>
  109 +</div>
  110 +
  111 +<div class="footer">
  112 +Copyright 2004-2007 Alex Gorbatchev.<br/>
  113 +</div>
  114 +
  115 +<script class="javascript" src="Scripts/shCore.js"></script>
  116 +<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
  117 +<script class="javascript" src="Scripts/shBrushPhp.js"></script>
  118 +<script class="javascript" src="Scripts/shBrushJScript.js"></script>
  119 +<script class="javascript" src="Scripts/shBrushJava.js"></script>
  120 +<script class="javascript" src="Scripts/shBrushVb.js"></script>
  121 +<script class="javascript" src="Scripts/shBrushSql.js"></script>
  122 +<script class="javascript" src="Scripts/shBrushXml.js"></script>
  123 +<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
  124 +<script class="javascript" src="Scripts/shBrushPython.js"></script>
  125 +<script class="javascript" src="Scripts/shBrushRuby.js"></script>
  126 +<script class="javascript" src="Scripts/shBrushCss.js"></script>
  127 +<script class="javascript" src="Scripts/shBrushCpp.js"></script>
  128 +<script class="javascript">
  129 +dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
  130 +dp.SyntaxHighlighter.HighlightAll('code');
  131 +</script>
  132 +
  133 +</body>
  134 +<!-- InstanceEnd --></html>
90 dp.SyntaxHighlighter/CollapseCode.html
... ... @@ -0,0 +1,90 @@
  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" -->Collapse Code<!-- 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 +
  51 +<p>You can have the code collapsed at first by adding <code>collapse</code>.</p>
  52 +<p><code>&lt;pre name="code" class="c-sharp:collapse" /></code></p>
  53 +
  54 +<pre name="code" class="c-sharp:collapse">
  55 +1 2 3 4 5 6 7 8 9
  56 +string path = "";
  57 +string safeReferrer = null;
  58 +FileInfo fileInfo = new FileInfo(string.Format("{0}/{1}", path, image));
  59 +int index = 0;
  60 +</pre>
  61 +<!-- InstanceEndEditable -->
  62 +<hr/>
  63 +Text body after.
  64 +</div>
  65 +</div>
  66 +
  67 +<div class="footer">
  68 +Copyright 2004-2007 Alex Gorbatchev.<br/>
  69 +</div>
  70 +
  71 +<script class="javascript" src="Scripts/shCore.js"></script>
  72 +<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
  73 +<script class="javascript" src="Scripts/shBrushPhp.js"></script>
  74 +<script class="javascript" src="Scripts/shBrushJScript.js"></script>
  75 +<script class="javascript" src="Scripts/shBrushJava.js"></script>
  76 +<script class="javascript" src="Scripts/shBrushVb.js"></script>
  77 +<script class="javascript" src="Scripts/shBrushSql.js"></script>
  78 +<script class="javascript" src="Scripts/shBrushXml.js"></script>
  79 +<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
  80 +<script class="javascript" src="Scripts/shBrushPython.js"></script>
  81 +<script class="javascript" src="Scripts/shBrushRuby.js"></script>
  82 +<script class="javascript" src="Scripts/shBrushCss.js"></script>
  83 +<script class="javascript" src="Scripts/shBrushCpp.js"></script>
  84 +<script class="javascript">
  85 +dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
  86 +dp.SyntaxHighlighter.HighlightAll('code');
  87 +</script>
  88 +
  89 +</body>
  90 +<!-- InstanceEnd --></html>
190 dp.SyntaxHighlighter/Cpp.html
... ... @@ -0,0 +1,190 @@
  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" -->C++<!-- 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="c">
  51 +#include &lt;windows.h>
  52 +#include "winevent.hpp"
  53 +
  54 +#include &lt;time.h>
  55 +#include &lt;stdio.h>
  56 +
  57 +int nInt = 0;
  58 +int nStart = 0;
  59 +int nEnd = 0;
  60 +char buf[255];
  61 +
  62 +//////////////////////////////////////////////////////////////
  63 +// Event handlers
  64 +
  65 +template&lt;>
  66 +LRESULT OnMsg&lt;WM_CREATE>(HWND hWnd, WPARAM wParam, LPARAM lParam)
  67 +{
  68 + strcpy(buf, "Press any key to start test");
  69 + return DefWindowProc(hWnd, WM_CREATE, wParam, lParam);
  70 +}
  71 +
  72 +template&lt;>
  73 +LRESULT OnMsg&lt;WM_KEYDOWN>(HWND hWnd, WPARAM wParam, LPARAM lParam)
  74 +{
  75 + nInt = 0;
  76 + strcpy(buf, "running test, please wait ...");
  77 + InvalidateRect(hWnd, NULL, true);
  78 + SendMessage(hWnd, WM_PAINT, 0, 0);
  79 + nStart = GetTickCount();
  80 + PostMessage(hWnd, WM_TIMER, 0, 0);
  81 + return DefWindowProc(hWnd, WM_KEYDOWN, wParam, lParam);
  82 +}
  83 +
  84 +template&lt;>
  85 +LRESULT OnMsg&lt;WM_TIMER>(HWND hWnd, WPARAM wParam, LPARAM lParam)
  86 +{
  87 + if (nInt++ < 100000) {
  88 + PostMessage(hWnd, WM_TIMER, 0, 0);
  89 + } else {
  90 + nEnd = GetTickCount();
  91 + sprintf(buf, "Time elapsed = %d msec",
  92 + ((nEnd - nStart) * 1000) / CLOCKS_PER_SEC);
  93 + InvalidateRect(hWnd, NULL, true);
  94 + }
  95 + return 0;
  96 +}
  97 +
  98 +template&lt;>
  99 +LRESULT OnMsg&lt;WM_DESTROY>(HWND hWnd, WPARAM wParam, LPARAM lParam)
  100 +{
  101 + PostQuitMessage(0);
  102 + return 0;
  103 +}
  104 +
  105 +template&lt;>
  106 +LRESULT OnMsg&lt;WM_PAINT>(HWND hWnd, WPARAM wParam, LPARAM lParam)
  107 +{
  108 + PAINTSTRUCT ps;
  109 + HDC hdc;
  110 + hdc = BeginPaint(hWnd, &ps);
  111 + TextOut(hdc, 100, 100, buf, static_cast&lt;int>(strlen(buf)));
  112 + EndPaint(hWnd, &ps);
  113 + return DefWindowProc(hWnd, WM_PAINT, wParam, lParam);
  114 +}
  115 +
  116 +/****************************************************
  117 +// Entry point for the application.
  118 +****************************************************/
  119 +
  120 +int WINAPI WinMain(HINSTANCE hInstance,
  121 +HINSTANCE hPrevInstance, LPSTR szCmdLine, int nCmdShow)
  122 +{
  123 + InitMsgHandlers&lt;NULL>();
  124 +
  125 + static char szAppName[] = "demo";
  126 + HWND hwnd;
  127 + MSG msg;
  128 + WNDCLASSEX wndclass;
  129 +
  130 + wndclass.cbSize = sizeof(wndclass);
  131 + wndclass.style = CS_HREDRAW | CS_VREDRAW;
  132 + wndclass.lpfnWndProc = WndProc;
  133 + wndclass.cbClsExtra = 0;
  134 + wndclass.cbWndExtra = 0;
  135 + wndclass.hInstance = hInstance;
  136 + wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
  137 + wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
  138 + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
  139 + wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH);
  140 + wndclass.lpszClassName = szAppName;
  141 + wndclass.lpszMenuName = NULL;
  142 +
  143 + RegisterClassEx(&wndclass);
  144 +
  145 + hwnd = CreateWindow(szAppName, "Static Dispatch Demo",
  146 + WS_OVERLAPPEDWINDOW,
  147 + CW_USEDEFAULT, CW_USEDEFAULT,
  148 + CW_USEDEFAULT, CW_USEDEFAULT,
  149 + NULL, NULL, hInstance, NULL);
  150 +
  151 + ShowWindow(hwnd, nCmdShow);
  152 + UpdateWindow(hwnd);
  153 +
  154 + while ( GetMessage(&msg, NULL, 0, 0) ) {
  155 + TranslateMessage(&msg);
  156 + DispatchMessage(&msg);
  157 + }
  158 + return static_cast&lt;int>(msg.wParam);
  159 +}
  160 +</pre>
  161 +<!-- InstanceEndEditable -->
  162 +<hr/>
  163 +Text body after.
  164 +</div>
  165 +</div>
  166 +
  167 +<div class="footer">
  168 +Copyright 2004-2007 Alex Gorbatchev.<br/>
  169 +</div>
  170 +
  171 +<script class="javascript" src="Scripts/shCore.js"></script>
  172 +<script class="javascript" src="Scripts/shBrushCSharp.js"></script>
  173 +<script class="javascript" src="Scripts/shBrushPhp.js"></script>
  174 +<script class="javascript" src="Scripts/shBrushJScript.js"></script>
  175 +<script class="javascript" src="Scripts/shBrushJava.js"></script>
  176 +<script class="javascript" src="Scripts/shBrushVb.js"></script>
  177 +<script class="javascript" src="Scripts/shBrushSql.js"></script>
  178 +<script class="javascript" src="Scripts/shBrushXml.js"></script>
  179 +<script class="javascript" src="Scripts/shBrushDelphi.js"></script>
  180 +<script class="javascript" src="Scripts/shBrushPython.js"></script>
  181 +<script class="javascript" src="Scripts/shBrushRuby.js"></script>
  182 +<script class="javascript" src="Scripts/shBrushCss.js"></script>
  183 +<script class="javascript" src="Scripts/shBrushCpp.js"></script>
  184 +<script class="javascript">
  185 +dp.SyntaxHighlighter.ClipboardSwf = 'Scripts/clipboard.swf';
  186 +dp.SyntaxHighlighter.HighlightAll('code');
  187 +</script>
  188 +
  189 +</body>
  190 +<!-- InstanceEnd --></html>
108 dp.SyntaxHighlighter/CrashTest.html
... ... @@ -0,0 +1,108 @@
  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" -->Crash Test<!-- 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 +// SINGLE QUOTE ' HANGS
  52 +// retrouver la publication � partir de l`idagence / id type publication --- in this line makes it crash
  53 +if (iIdPublication == 0 && iIdTypePublication != 0 && iIdAgence != 0) {
  54 + sStmtA = "SELECT idpublication "
  55 + + " FROM table1 WITH(NOLOCK) "
  56 + + " WHERE idagence = " + iIdAgence
  57 + + " AND idtypepublication = " + iIdTypePublication;
  58 + using (Sql sql = new Sql("bc", "immobc"))
  59 + iIdPublication = F.ForceInt(sql.ExecScalar(sStmtA));
  60 +}
  61 +
  62 +// alertes pour une publication donn�e
  63 +if(iIdPublication != 0) {
  64 + using(Sql oSql = new Sql("aboemail")) {
  65 + sStmt = "SELECT table1.*, table3.*, table2.month, table2.year, "
  66 + + " table2.nbsends as nbsends2 "
  67 + + " FROM table1 WITH(NOLOCK) "
  68 + + " LEFT JOIN table2 WITH(NOLOCK) ON table1.idabo_email=table2.idabo_email "
  69 + + " INNER JOIN table3 WITH(NOLOCK) ON table1.idabotypeaction = table3.idabotypeaction "
  70 + + " WHERE idpublication = " + iIdPublication + sWhereSup
  71 + + " ORDER BY table1.idabo_email, table2.year DESC, table2.month DESC";
  72 + oDS=oSql.ExecCached(sStmt);
  73 + }
  74 +}
  75 +//Mail.SendMail("glop@glop.com","glop@glop.com","abo",sStmtP + " " + sStmtA + " " + sStmt,false);
  76 +string[] AMonths = new string[12] { "Janvier","F�vrier","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","D�cembre" };
  77 +DicContext["AMonths"] = AMonths;
  78 +</pre>
  79 +<!-- InstanceEndEditable -->
  80 +<hr/>
  81 +Text body after.
  82 +</div>
  83 +</div>
  84 +
  85 +<div class="footer">
  86 +Copyright 2004-2007 Alex Gorbatchev.<br/>
  87 +</div>
  88 +