Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 21D7DF042 for ; Thu, 30 May 2013 00:36:23 +0000 (UTC) Received: (qmail 37535 invoked by uid 500); 30 May 2013 00:36:23 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 37517 invoked by uid 500); 30 May 2013 00:36:23 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 37506 invoked by uid 99); 30 May 2013 00:36:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 May 2013 00:36:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 May 2013 00:36:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1E54C2388C74; Thu, 30 May 2013 00:34:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1487690 [35/38] - in /incubator/ambari/site/1.2.3: ./ installing-hadoop-using-ambari/ installing-hadoop-using-ambari/common/ installing-hadoop-using-ambari/common/css/ installing-hadoop-using-ambari/common/images/ installing-hadoop-using-a... Date: Thu, 30 May 2013 00:34:44 -0000 To: ambari-commits@incubator.apache.org From: yusaku@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130530003453.1E54C2388C74@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shCore.js URL: http://svn.apache.org/viewvc/incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shCore.js?rev=1487690&view=auto ============================================================================== --- incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shCore.js (added) +++ incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shCore.js Thu May 30 00:34:39 2013 @@ -0,0 +1,346 @@ +function highlightCode(a){var b=a.target;null==b&&(b=a.srcElement);var c=findParentElement(b,".syntaxhighlighter"),d=findContainerElement(b),e=document.createElement("textarea"),f,g=getHighlighterId(c.id);f=document.getElementById(g),addClass(c,"source");var h=d.childNodes,i=[];for(var j=0;j0){var e=0,f=null;for(e=0;e-1},setFlag:function(a){d+=a}};while(i1&&o(c,"")>-1&&(e=RegExp(this.source,g.replace.call(m(this),"g","")),g.replace.call((b+"").slice(c.index),e,function(){for(var b=1;bc.index&&this.lastIndex--}return this.global||(this.lastIndex=f),c},RegExp.prototype.test=function(a){var b,c;return this.global||(c=this.lastIndex),b=g.exec.call(t his,a),b&&!i&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,this.global||(this.lastIndex=c),!!b},String.prototype.match=function(a){XRegExp.isRegExp(a)||(a=RegExp(a));if(a.global){var b=g.match.apply(this,arguments);return a.lastIndex=0,b}return a.exec(this)},String.prototype.replace=function(a,c){var d=XRegExp.isRegExp(a),e,f,h,i;return d?(a._xregexp&&(e=a._xregexp.captureNames),a.global||(i=a.lastIndex)):a+="",Object.prototype.toString.call(c)==="[object Function]"?f=g.replace.call(this+"",a,function(){if(e){arguments[0]=new String(arguments[0]);for(var b=0;b-1?a[g+1]:b)}switch(c){case"$":return"$";case"&":return a[0];case"`":re turn a[a.length-1].slice(0,a[a.length-2]);case"'":return a[a.length-1].slice(a[a.length-2]+a[0].length);default:var f="";c=+c;if(!c)return b;while(c>a.length-3)f=String.prototype.slice.call(c,-1)+f,c=Math.floor(c/10);return(c?a[c]||"":"$")+f}})})),d&&(a.global?a.lastIndex=0:a.lastIndex=i),f},String.prototype.split=function(b,c){if(!XRegExp.isRegExp(b))return g.split.apply(this,arguments);var d=this+"",e=[],f=0,h,i;if(c===a||+c<0)c=Infinity;else{c=Math.floor(+c);if(!c)return[]}b=XRegExp.copyAsGlobal(b);while(h=b.exec(d)){if(b.lastIndex>f){e.push(d.slice(f,h.index)),h.length>1&&h.index=c)break}b.lastIndex===h.index&&b.lastIndex++}return f===d.length?(!g.test.call(b,"")||i)&&e.push(""):e.push(d.slice(f)),e.length>c?e.slice(0,c):e},XRegExp.addToken(/\(\?#[^)]*\)/,function(a){return g.test.call(d,a.input.slice(a.index+a[0].length))?"":"(?:)"}),XRegExp.addToken(/\((?!\?)/,function(){return this.captureNames.push(null),"("}),XRegExp.addToken(/\(\?<([$\w]+)>/,function(a){return this.captureNames.push(a[1]),this.hasNamedCapture=!0,"("}),XRegExp.addToken(/\\k<([\w$]+)>/,function(a){var b=o(this.captureNames,a[1]);return b>-1?"\\"+(b+1)+(isNaN(a.input.charAt(a.index+a[0].length))?"":"(?:)"):a[0]}),XRegExp.addToken(/\[\^?]/,function(a){return a[0]==="[]"?"\\b\\B":"[\\s\\S]"}),XRegExp.addToken(/^\(\?([imsx]+)\)/,function(a){return this.setFlag(a[1]),""}),XRegExp.addToken(/(?:\s+|#.*)+/,function(a){return g.test.call(d,a.input.slice(a.index+a[0].length))?"":"(?:)"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("x")}),XRegExp.addToken(/\./,function(){return"[\\s\\S]"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("s")})})();if(typeof SyntaxHighlighter=="undefined")var SyntaxHighlighter=function(){function b(a){var b=[];for(var c=0;c(.*?))\\]$"),e=new XRegExp("(?[\\w-]+)\\s*:\\s*(?[\\w-%#]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");while((b=e.exec(a))!=null){var f=b.value.replace(/^['"]|['"]$/g,"");if(f!=null&&d.test(f)){var g=d.exec(f);f=g.values.length>0?g.values.split(/\s*,\s*/):[]}c[b.name]=f}return c}function r(b,c){return b==null||b.length==0||b=="\n"?b:(b=b.replace(/'+a+""})),b)}function s(a,b){var c=a.toString();while(c.length|<br\s*\/?>/gi;return a.config.bloggerMode==1&&(b=b.replace(c,"\n")),a.config.stripBrs==1&&(b=b.replace(c,"")),b}function w(a){return a.replace(/^\s+|\s+$/g,"")}function x(a){var b=c(v(a)),d=new Array,e=/^\s*/,f=1e3;for(var g=0;g0;g++){var h=b[g];if(w(h).length==0)continue;var i=e.exec(h);if(i==null)return a;f=Math.min(i[0].length,f)}if(f>0)for(var g=0;gb.index?1:a.lengthb.length?1:0}function z(b,c){function d(a,b){return a[0]}var e=0,f=null,g=[],h=c.func?c.func:d;while((f=c.regex.exec(b))!=null){var i=h(f,c);typeof i=="string"&&(i=[new a.Match(i,f.index,c.css)]),g=g.concat(i)}return g}function A(b){var c=/(.*)((>|<).*)/;return b.replace(a.regexLib.url,function(a){var b="",d=null;if(d=c.exec(a))a=d[1],b=d[2];return''+a+""+b})}function B(){var a=document.getElementsByTagName("script"),b=[];for(var c=0;c0){e=0;for(e=0;e)/gm,url:/\w+:\/\/[\w-.\/?%&=:@;#]*/g,phpScriptTags:{left:/(<|<)\?(?:=|php)?/g,right:/\?(>|>)/g,eof:!0},as pScriptTags:{left:/(<|<)%=?/g,right:/%(>|>)/g},scriptScriptTags:{left:/(<|<)\s*script.*?(>|>)/gi,right:/(<|<)\/\s*script\s*(>|>)/gi}},toolbar:{getHtml:function(b){function f(b,c){return a.toolbar.getButtonHtml(b,c,a.config.strings[c])}var c='
',d=a.toolbar.items,e=d.list;for(var g=0;g Select Text
'},handler:function(b){function f(a){var b=new RegExp(a+"_(\\w+)"),c=b.exec(e);return c?c[1]:null}var c=b.target,e=c.className||"",g=d(findParentElement(c,".syntaxhighlighter").id),h=f("command");g&&h&&a.toolbar.items[h].execute(g),b.preventDefault()},items:{list:["expandSource","help"],expandSource:{getHtml:function(b){if(b.getParam("collapse")!=1)return"";var c=b.getParam("title") ;return a.toolbar.getButtonHtml(b,"expandSource",c?c:a.config.strings.expandSource)},execute:function(a){var b=e(a.id);removeClass(b,"collapsed")}},help:{execute:function(b){var c=k("","_blank",500,250,"scrollbars=0"),d=c.document;d.write(a.config.strings.aboutDialog),d.close(),c.focus()}}}},findElements:function(c,d){var e=d?[d]:b(document.getElementsByTagName(a.config.tagName)),f=a.config,g=[];f.useScriptTags&&(e=e.concat(B()));if(e.length===0)return g;for(var h=0;hd)break;f.index==c.index&&f.length>c.length?a[b]=null:f.index>=c.index&&f.index'+c+""},getLineNumbersHtml:function(b,d){var e="",f=c(b).length,g=parseInt(this.getParam("first-line")),h=this.getParam("pad-line-numbers");h==1?h=(g+f-1).toString().length:isNaN(h)==1&&(h=0);for(var i=0;i'+l+"":"")+j)}return b},getTitleHtml:function(a){return a?""+a+"":""},getMatchesHtml:function(a,b){function f(a){var b=a?a.brushName||e:e;return b?b+" ":""}var c=0,d="",e=this.getParam("brush","");for(var g=0;g/ig,"@@@@$5@$5@@@@"),b=b.replace(//ig,"~~~~$5~$5~~~~"),b=b.replace(/(.+?)<\/strong>(.)*?<\/span>/ig,"!!!!$4!!!!"),this.getParam("light")==1&&(this.params.toolbar=this.params.gutter=!1),className="syntaxhighlighter",this.getParam ("collapse")==1&&d.push("collapsed"),(gutter=this.getParam("gutter"))==0&&d.push("nogutter"),d.push(this.getParam("class-name")),d.push(this.getParam("brush")),b=p(b).replace(/\r/g," "),e=this.getParam("tab-size"),b=this.getParam("smart-tabs")==1?u(b,e):t(b,e),this.getParam("unindent")&&(b=x(b)),gutter&&(g=this.figureOutLineNumbers(b)),f=this.findMatches(this.regexList,b),c=this.getMatchesHtml(b,f),c=this.getCodeLinesHtml(c,g),this.getParam("auto-links")&&(c=A(c)),typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.match(/MSIE/)&&d.push("ie"),c='
'+(this.getParam("toolbar")?a.toolbar.getHtml(this):"")+''+this.getTitleHtml(this.getParam("title"))+""+""+(gutter?'":"")+'"+""+""+"
'+this.getLineNumbersHtml(b)+"'+'
'+c+"
"+"
"+"
",c=c.replace( /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g,'($2)'),c=c.replace(/~~~~([0-9]?[0-9])~([0-9]?[0-9])~~~~/g,'($2)'),c=c.replace(/!!!!(.+?)!!!!/g,'$1'),c},getDiv:function(b){b===null&&(b=""),this.code=b;var c=this.create("div");return c.innerHTML=this.getHtml(b),this.getParam("toolbar")&&l(findElement(c,".toolbar"),"click",a.toolbar.handler),this.getParam("quick-code")&&l(findElement(c,".code"),"dblclick",D),c},init:function(b){this.id=h(),f(this),this.params=i(a.defaults,b||{}),this.getParam("light")==1&&(this.params.toolbar=this.params.gutter=!1)},getKeywords:function(a){return a=a.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"|"),"\\b(?:"+a+")\\b"},forHtmlScript:function(a){var b={end:a.right.source};a.eof&&(b.end="(?:(?:"+b.end+")|$)"),this.htmlScript={left:{regex:a.left,css:"script"},right:{regex:a.rig ht,css:"script"},code:new XRegExp("(?"+a.left.source+")"+"(?.*?)"+"(?"+b.end+")","sgi")}}},a}();typeof exports!="undefined"?exports.SyntaxHighlighter=SyntaxHighlighter:null + +;(function() +{ + // CommonJS + SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); + + function Brush() + { + var keywords = 'if fi then elif else for do done until while break continue case esac 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 curl 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 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 = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g, css: 'removed'}, + {regex: /(\-(.)+?\s)|curl\s/ig, css: 'color2 bold'}, + { 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', 'sh']; + + SyntaxHighlighter.brushes.Bash = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); + +SyntaxHighlighter.brushes.Custom = function() +{ + var operators = '{ } [ ] : ,'; + + + this.regexList = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g, css: 'removed'}, + //has a double quote followed by any sequence of characters followed by a double quote followed by colon + { regex: /.*\"(.*)\"(\s)*\:/g, css: 'keyword'}, + //opposite the above + { regex: /[^(.*\".*\"(\s)*\:)]/g, css: 'comments'}, + + //has a single quote followed by any sequence of characters followed by a single quote followed by colon + { regex: /.*\'.*\'(\s)*\:/g, css: 'keyword'}, + //opposite the above + { regex: /[^(.*\'.*\'(\s)*\:)]/g, css: 'comments'}, + + //Handle commas + //a comma followed by 0 or 1 space + { regex: /\,(\s)?/g, css: 'string'}, + + //Handle the special characters + //Any of the braces followed by 1 or 0 space + { regex: /(\{|\}|\[|\])(\s)?/g, css: 'plain'}, + //1 or 0 space followed by a } and followed by 1 or 0 space + { regex: /(\s)?\}(\s)?/g, css: 'plain'} + + ]; +}; + +SyntaxHighlighter.brushes.Custom.prototype = new SyntaxHighlighter.Highlighter(); +SyntaxHighlighter.brushes.Custom.aliases = ['json', 'JSON']; + + +;(function() +{ + // CommonJS + SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); + + function Brush() + { + var keywords = 'break case catch continue ' + + 'default delete do else false ' + + 'for function if in instanceof ' + + 'new null return super switch ' + + 'this throw true try typeof var while with' + ; + + var r = SyntaxHighlighter.regexLib; + + this.regexList = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g, css: 'removed'}, + { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings + { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings + { regex: r.singleLineCComments, css: 'comments' }, // one line comments + { regex: r.multiLineCComments, css: 'comments' }, // multiline comments + { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords + ]; + + this.forHtmlScript(r.scriptScriptTags); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['js', 'jscript', 'javascript']; + + SyntaxHighlighter.brushes.JScript = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); + + +/** + * 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 + SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); + + function Brush() + { + function process(match, regexInfo) + { + var constructor = SyntaxHighlighter.Match, + code = match[0], + tag = new XRegExp('(<|<)[\\s\\/\\?]*(?[:\\w-\\.]+)', 'xg').exec(code), + result = [] + ; + + if (match.attributes != null) + { + var attributes, + regex = new XRegExp('(? [\\w:\\-\\.]+)' + + '\\s*=\\s*' + + '(? ".*?"|\'.*?\'|\\w+)', + 'xg'); + + while ((attributes = regex.exec(code)) != null) + { + result.push(new constructor(attributes.name, match.index + attributes.index, 'color1')); + result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string')); + } + } + + if (tag != null) + result.push( + new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword') + ); + + return result; + } + + this.regexList = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g,css: 'removed'}, + {regex: /\w+?\=/g, css: 'color1'}, + {regex: /\"[^\"]+\"/g, css: 'string'}, + { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // + { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // + { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process } + ]; + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['xml', 'xhtml', 'xslt', 'html']; + + SyntaxHighlighter.brushes.Xml = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); + + +;(function() +{ + // CommonJS + SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); + + function Brush() + { + // Contributed by Gheorghe Milas and Ahmad Sherif + + var keywords = 'and assert break class continue def del elif else ' + + 'except exec finally for from global if import in is ' + + 'lambda not or pass print raise return try yield while'; + + var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' + + 'chr classmethod cmp coerce compile complex delattr dict dir ' + + 'divmod enumerate eval execfile file filter float format frozenset ' + + 'getattr globals hasattr hash help hex id input int intern ' + + 'isinstance issubclass iter len list locals long map max min next ' + + 'object oct open ord pow print property range raw_input reduce ' + + 'reload repr reversed round set setattr slice sorted staticmethod ' + + 'str sum super tuple type type unichr unicode vars xrange zip'; + + var special = 'None True False self cls class_'; + + this.regexList = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g, css: 'removed'}, + { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, + { regex: /^\s*@\w+/gm, css: 'decorator' }, + { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' }, + { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' }, + { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' }, + { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' }, + { regex: /\b\d+\.?\w*/g, css: 'value' }, + { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, + { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' } + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['py', 'python']; + + SyntaxHighlighter.brushes.Python = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); + + +;(function() +{ + // CommonJS + SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); + + function Brush() + { + var keywords = 'abstract assert boolean break byte case catch char class const ' + + 'continue default do double else enum extends ' + + 'false final finally float for goto if implements import ' + + 'instanceof int interface long native new null ' + + 'package private protected public return ' + + 'short static strictfp super switch synchronized this throw throws true ' + + 'transient try void volatile while'; + + this.regexList = [ + //Make sure the replacement for the callouts does not get highlighted + {regex: /@@@@([0-9]?[0-9])@([0-9]?[0-9])@@@@/g, css: 'removed'}, + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments + { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers + { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno + { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword + ]; + + this.forHtmlScript({ + left : /(<|<)%[@!=]?/g, + right : /%(>|>)/g + }); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['java']; + + SyntaxHighlighter.brushes.Java = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); + +/** + * 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() + { + // Contributed by Yegor Jbanov and David Bernard. + + var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' + + 'override try lazy for var catch throw type extends class while with new final yield abstract ' + + 'else do if return protected private this package false'; + + var keyops = '[_:=><%#@]+'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings + { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings + { regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords + { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword + ]; + } + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['scala']; + + SyntaxHighlighter.brushes.Scala = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); Added: incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shLegacy.js URL: http://svn.apache.org/viewvc/incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shLegacy.js?rev=1487690&view=auto ============================================================================== --- incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shLegacy.js (added) +++ incubator/ambari/site/1.2.3/installing-hadoop-using-ambari/content/scripts/shLegacy.js Thu May 30 00:34:39 2013 @@ -0,0 +1,17 @@ +/** + * 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. + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3 u={8:{}};u.8={A:4(c,k,l,m,n,o){4 d(a,b){2 a!=1?a:b}4 f(a){2 a!=1?a.E():1}c=c.I(":");3 g=c[0],e={};t={"r":K};M=1;5=8.5;9(3 j R c)e[c[j]]="r";k=f(d(k,5.C));l=f(d(l,5.D));m=f(d(m,5.s));o=f(d(o,5.Q));n=f(d(n,5["x-y"]));2{P:g,C:d(t[e.O],k),D:d(t[e.N],l),s:d({"r":r}[e.s],m),"x-y":d(4(a,b){9(3 h=T S("^"+b+"\\\\[(?\\\\w+)\\\\]$","U"),i=1,p=0;p