JavaScript DHTML/GUI Components/Syntax HighLighter
Содержание
CodePress - Real Time Syntax Highlighting Editor written in JavaScript
<A href="http://www.wbex.ru/Code/JavaScriptDownload/codepress-v.0.9.6.zip">codepress-v.0.9.6.zip( 63 k)</a>
1. <A href="/Code/JavaScript/GUI-Components/SyntaxHighLighterinJavaScript.htm">Syntax HighLighter in JavaScript</a> 2. <A href="/Code/JavaScript/GUI-Components/SyntaxHighlighter150.htm">Syntax Highlighter 1.5.0</a> <A href="/Code/JavaScript/GUI-Components/SyntaxHighlighter150.htm"></a>
Syntax Highlighter 1.5.0
<A href="http://www.wbex.ru/Code/JavaScriptDownload/SyntaxHighlighter_1.5.0.zip">SyntaxHighlighter_1.5.0.zip( 58 k)</a>
1. <A href="/Code/JavaScript/GUI-Components/SyntaxHighLighterinJavaScript.htm">Syntax HighLighter in JavaScript</a> 2. <A href="/Code/JavaScript/GUI-Components/CodePressRealTimeSyntaxHighlightingEditorwritteninJavaScript.htm">CodePress - Real Time Syntax Highlighting Editor written in JavaScript</a> <A href="/Code/JavaScript/GUI-Components/CodePressRealTimeSyntaxHighlightingEditorwritteninJavaScript.htm"></a>
Syntax HighLighter in JavaScript
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>
<head> <title>star-light</title> <meta name="author" content="Dean Edwards"/> <meta name="copyright" content="© copyright 2005, Dean Edwards"/> <link rel="stylesheet" href="star-light.css" type="text/css"/> </head>
<body>
star-light
A configurable syntax-highlighter.
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Sample HTML</title> <meta name="author" content="Dean Edwards"/> <!-- keeping code tidy!! --> <meta name="copyright" content="© copyright 2005, Dean Edwards"/> <style type="text/css"> body {color: black;} </style> <script type="text/javascript"> onload = function() { // do something }; </script> </head> <body> <p>Hello World!</p> </body> </html>
CSS
@import url(http://www.example.ru/test.css); /* comment */ @media screen { div.document { background-color: #eee; width: 0; } }
JavaScript
// this is a "comment" /* so is this */ var string = "/* string */"; alert("Hello \"Dean\"!"); function getText(a, b, c) { if (a && b) return a + b + c.toString(); };
PHP
<?php // author: dean@edwards.name $string = "/* string */"; print("Hello Dean!"); function getText($a, $b, $c) { return $a + $b + $c; }; ?>
Email/Discussion
So said the script writer: > I like *bold* text! :-) > > But the other man said: >> I like /italicised/ text. :( >> >> A third fellow chimed in: >>> I think _underlined_ text should suit you both. ;-) >>> >> _Hey_! He"s right! :-) > _Groovy_. ;-)
VBScript
Rem this is a "comment" " so is this Function MyHex(ByVal Number) Dim Sign Const HexChars = "0123456789ABCDEF" Sign = Sgn(Number) Number = Fix(Abs(CDbl(number))) If Number = 0 Then MyHex = "0" Exit Function End If While Number > 0 MyHex = Mid(HexChars, 1 + (Number - 16 * Fix(Number / 16)), 1) & MyHex Number = Fix(Number/16) WEnd If Sign = -1 Then MyHex = "-" & MyHex End Function
T-SQL
CREATE PROC nth ( @table_name sysname, @column_name sysname, @nth int ) AS BEGIN --Date written: December 23rd 2000 --Purpose: To find out the nth highest number in a column. SET @table_name = RTRIM(@table_name) SET @column_name = RTRIM(@column_name) DECLARE @exec_str CHAR(400) IF (SELECT OBJECT_ID(@table_name,"U")) IS NULL BEGIN RAISERROR("Invalid table name",18,1) RETURN -1 END
</body> </html>
</source>