Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
/* jTemplates 0.8.3 (http://jtemplates.tpython.com) Copyright (c) 2007-2012 Tomasz Gloc */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('6(3v.b&&!3v.b.3w){(7(b){9 j=7(s,H,m){5.1g=[];5.1D={};5.2J=u;5.1W={};5.1h={};5.m=b.1i({1X:1b,3x:1x,2K:1b,2L:1b,3y:1x,3z:1x},m);5.1E=(5.m.1E!==D)?(5.m.1E):(R.2g);5.13=(5.m.13!==D)?(5.m.13):(R.3A);5.2h=(5.m.2h!==D)?(5.m.2h):((5.m.1X)?(b.2M):(R.2M));6(s==u){c}5.3B(s,H);6(s){5.1F(5.1h[\'2i\'],H,5.m)}5.1h=u};j.4j=\'0.8.3\';j.J=1b;j.3C=4k;j.1y=0;j.z.3B=7(s,H){9 2N=/\\{#1c *(\\w+) *(.*?) *\\}/g,2j,1G,U,1H=u,2O=[],i;2P((2j=2N.4l(s))!==u){1H=2N.1H;1G=2j[1];U=s.1Y(\'{#/1c \'+1G+\'}\',1H);6(U===-1){E p V(\'14: j "\'+1G+\'" 2Q 2k 4m.\');}5.1h[1G]=s.1Z(1H,U);2O[1G]=R.2R(2j[2])}6(1H===u){5.1h[\'2i\']=s;c}K(i 2l 5.1h){6(i!==\'2i\'){5.1W[i]=p j()}}K(i 2l 5.1h){6(i!==\'2i\'){5.1W[i].1F(5.1h[i],b.1i({},H||{},5.1W||{}),b.1i({},5.m,2O[i]));5.1h[i]=u}}};j.z.1F=7(s,H,m){6(s==D){5.1g.x(p 1p(\'\',1,5));c}s=s.15(/[\\n\\r]/g,\'\');s=s.15(/\\{\\*.*?\\*\\}/g,\'\');5.2J=b.1i({},5.1W||{},H||{});5.m=p 2m(m);9 A=5.1g,20=s.1j(/\\{#.*?\\}/g),1d=0,U=0,e,1q=0,i,l;K(i=0,l=(20)?(20.X):(0);i<l;++i){9 Z=20[i];6(1q){U=s.1Y(\'{#/1I}\');6(U===-1){E p V("14: 4n 21 3D 1I.");}6(U>1d){A.x(p 1p(s.1Z(1d,U),1,5))}1d=U+11;1q=0;i=b.4o(\'{#/1I}\',20);22}U=s.1Y(Z,1d);6(U>1d){A.x(p 1p(s.1Z(1d,U),1q,5))}Z.1j(/\\{#([\\w\\/]+).*?\\}/);9 2n=L.$1;2S(2n){B\'4p\':A.2T(Z);F;B\'6\':e=p 1z(A,5);e.2T(Z);A.x(e);A=e;F;B\'W\':A.2U();F;B\'/6\':B\'/K\':B\'/2V\':A=A.2W();F;B\'2V\':e=p 1A(Z,A,5);A.x(e);A=e;F;B\'K\':e=3E(Z,A,5);A.x(e);A=e;F;B\'22\':B\'F\':A.x(p 16(2n));F;B\'2X\':A.x(p 2Y(Z,5.2J,5));F;B\'h\':A.x(p 2Z(Z,5));F;B\'9\':A.x(p 30(Z,5));F;B\'31\':A.x(p 32(Z));F;B\'4q\':A.x(p 1p(\'{\',1,5));F;B\'4r\':A.x(p 1p(\'}\',1,5));F;B\'1I\':1q=1;F;B\'/1I\':6(j.J){E p V("14: 4s 33 3D 1I.");}F;3F:6(j.J){E p V(\'14: 4t 4u: \'+2n+\'.\');}}1d=U+Z.X}6(s.X>1d){A.x(p 1p(s.3G(1d),1q,5))}};j.z.M=7(d,h,q,I){++I;6(I==1&&q!=D){b.34(q,"2o")}9 $T=d,$P,17=\'\';6(5.m.3y){$T=5.1E(d,{2p:(5.m.3x&&I==1),23:5.m.1X},5.13)}6(!5.m.3z){$P=b.1i({},5.1D,h)}W{$P=b.1i({},5.1E(5.1D,{2p:(5.m.2K),23:1b},5.13),5.1E(h,{2p:(5.m.2K&&I==1),23:1b},5.13))}K(9 i=0,l=5.1g.X;i<l;++i){17+=5.1g[i].M($T,$P,q,I)}5.2q=u;--I;c 17};j.z.10=7(){6(5.2q==u){5.2q=p 2r(5)}c 5.2q};j.z.35=7(24,1B){5.1D[24]=1B};R=7(){};R.3A=7(3H){c 3H.15(/&/g,\'&4v;\').15(/>/g,\'&3I;\').15(/</g,\'&3J;\').15(/"/g,\'&4w;\').15(/\'/g,\'&#39;\')};R.2g=7(d,1J,13){6(d==u){c d}2S(d.36){B 2m:9 o={};K(9 i 2l d){o[i]=R.2g(d[i],1J,13)}6(!1J.23){6(d.4x("37")){o.37=d.37}}c o;B 4y:9 a=[];K(9 i=0,l=d.X;i<l;++i){a[i]=R.2g(d[i],1J,13)}c a;B 38:c(1J.2p)?(13(d)):(d);B 3K:6(1J.23){6(j.J){E p V("14: 4z 4A 2k 4B.");}W{c D}}}c d};R.2R=7(2s){6(2s===u||2s===D){c{}}9 o=2s.4C(/[= ]/);6(o[0]===\'\'){o.4D()}9 25={};K(9 i=0,l=o.X;i<l;i+=2){25[o[i]]=o[i+1]}c 25};R.2M=7(G){6(1K G!=="4E"||!G){c u}1k{c(p 3K("c "+b.3L(G)))()}1l(e){6(j.J){E p V("14: 4F 4G");}c{}}};R.3M=7(26,1y,3a){2P(26!=u){9 d=b.G(26,\'2o\');6(d!=D&&d.1y==1y&&d.d[3a]!=D){c d.d[3a]}26=26.4H}c u};9 1p=7(3b,1q,1c){5.27=3b;5.3N=1q;5.O=1c};1p.z.M=7(d,h,q,I){6(5.3N){c 5.27}9 s=5.27;9 18="";9 i=-1;9 28=0;9 29=-1;9 1L=0;2P(1x){9 1M=s.1Y("{",i+1);9 1N=s.1Y("}",i+1);6(1M<0&&1N<0){F}6((1M!=-1&&1M<1N)||(1N==-1)){i=1M;6(++28==1){29=1M;18+=s.1Z(1L,i);1L=-1}}W{i=1N;6(--28===0){6(29>=0){18+=5.O.10().3O(d,h,q,s.1Z(29,1N+1));29=-1;1L=i+1}}W 6(28<0){28=0}}}6(1L>-1){18+=s.3G(1L)}c 18};2r=7(t){5.3c=t};2r.z.3O=7($T,$P,$Q,2t){1k{9 18=3d(2t);6(b.4I(18)){6(5.3c.m.1X||!5.3c.m.2L){c\'\'}18=18($T,$P,$Q)}c(18===D)?(""):(38(18))}1l(e){6(j.J){6(e 1C 16){e.1m="4J"}E e;}c""}};2r.z.19=7($T,$P,$Q,2t){c 3d(2t)};9 1z=7(1O,1r){5.2u=1O;5.1P=1r;5.2a=[];5.1g=[];5.1Q=u};1z.z.x=7(e){5.1Q.x(e)};1z.z.2W=7(){c 5.2u};1z.z.2T=7(N){N.1j(/\\{#(?:W)*6 (.*?)\\}/);5.2a.x(L.$1);5.1Q=[];5.1g.x(5.1Q)};1z.z.2U=7(){5.2a.x(1x);5.1Q=[];5.1g.x(5.1Q)};1z.z.M=7(d,h,q,I){9 17=\'\';1k{K(9 2b=0,3P=5.2a.X;2b<3P;++2b){6(5.1P.10().19(d,h,q,5.2a[2b])){9 t=5.1g[2b];K(9 i=0,l=t.X;i<l;++i){17+=t[i].M(d,h,q,I)}c 17}}}1l(e){6(j.J||(e 1C 16)){E e;}}c 17};3E=7(N,1O,1c){6(N.1j(/\\{#K (\\w+?) *= *(\\S+?) +4K +(\\S+?) *(?:1a=(\\S+?))*\\}/)){9 f=p 1A(u,1O,1c);f.C=L.$1;f.Y={\'33\':(L.$2||0),\'21\':(L.$3||-1),\'1a\':(L.$4||1),\'y\':\'$T\'};f.3e=(7(i){c i});c f}W{E p V(\'14: 4L 4M "3Q": \'+N);}};9 1A=7(N,1O,1c){5.2u=1O;5.O=1c;6(N!=u){N.1j(/\\{#2V +(.+?) +3R +(\\w+?)( .+)*\\}/);5.3S=L.$1;5.C=L.$2;5.Y=L.$3||u;5.Y=R.2R(5.Y)}5.2v=[];5.2w=[];5.3f=5.2v};1A.z.x=7(e){5.3f.x(e)};1A.z.2W=7(){c 5.2u};1A.z.2U=7(){5.3f=5.2w};1A.z.M=7(d,h,q,I){1k{9 1s=(5.3e===D)?(5.O.10().19(d,h,q,5.3S)):(5.3e);6(1s===$){E p V("2c: 4N \'$\' 4O 4P 4Q 3R 3T-7");}9 2d=[];9 1R=1K 1s;6(1R==\'3U\'){9 3g=[];b.1t(1s,7(k,v){2d.x(k);3g.x(v)});1s=3g}9 y=(5.Y.y!==D)?(5.O.10().19(d,h,q,5.Y.y)):((d!=u)?(d):({}));6(y==u){y={}}9 s=2e(5.O.10().19(d,h,q,5.Y.33)||0),e;9 1a=2e(5.O.10().19(d,h,q,5.Y.1a)||1);6(1R!=\'7\'){e=1s.X}W{6(5.Y.21===D||5.Y.21===u){e=2e.4R}W{e=2e(5.O.10().19(d,h,q,5.Y.21))+((1a>0)?(1):(-1))}}9 17=\'\';9 i,l;6(5.Y.2f){9 3h=s+2e(5.O.10().19(d,h,q,5.Y.2f));e=(3h>e)?(e):(3h)}6((e>s&&1a>0)||(e<s&&1a<0)){9 1S=0;9 3V=(1R!=\'7\')?(4S.4T((e-s)/1a)):D;9 1u,1n;9 3i=0;K(;((1a>0)?(s<e):(s>e));s+=1a,++1S,++3i){6(j.J&&3i>j.3C){E p V("2c: 4U 3T 4V 4W 4X");}1u=2d[s];6(1R!=\'7\'){1n=1s[s]}W{1n=1s(s);6(1n===D||1n===u){F}}6((1K 1n==\'7\')&&(5.O.m.1X||!5.O.m.2L)){22}6((1R==\'3U\')&&(1u 2l 2m)&&(1n===2m[1u])){22}9 3W=y[5.C];y[5.C]=1n;y[5.C+\'$3X\']=s;y[5.C+\'$1S\']=1S;y[5.C+\'$3Y\']=(1S===0);y[5.C+\'$3Z\']=(s+1a>=e);y[5.C+\'$40\']=3V;y[5.C+\'$2d\']=(1u!==D&&1u.36==38)?(5.O.13(1u)):(1u);y[5.C+\'$1K\']=1K 1n;K(i=0,l=5.2v.X;i<l;++i){1k{17+=5.2v[i].M(y,h,q,I)}1l(1T){6(1T 1C 16){2S(1T.1m){B\'22\':i=l;F;B\'F\':i=l;s=e;F;3F:E 1T;}}W{E 1T;}}}1v y[5.C+\'$3X\'];1v y[5.C+\'$1S\'];1v y[5.C+\'$3Y\'];1v y[5.C+\'$3Z\'];1v y[5.C+\'$40\'];1v y[5.C+\'$2d\'];1v y[5.C+\'$1K\'];1v y[5.C];y[5.C]=3W}}W{K(i=0,l=5.2w.X;i<l;++i){17+=5.2w[i].M(d,h,q,I)}}c 17}1l(e){6(j.J||(e 1C 16)){E e;}c""}};9 16=7(1m){5.1m=1m};16.z=V;16.z.M=7(d){E 5;};9 2Y=7(N,H,1r){N.1j(/\\{#2X (.*?)(?: 4Y=(.*?))?\\}/);5.O=H[L.$1];6(5.O==D){6(j.J){E p V(\'14: 4Z 3Q 2X: \'+L.$1);}}5.41=L.$2;5.42=1r};2Y.z.M=7(d,h,q,I){1k{c 5.O.M(5.42.10().19(d,h,q,5.41),h,q,I)}1l(e){6(j.J||(e 1C 16)){E e;}}c\'\'};9 2Z=7(N,1r){N.1j(/\\{#h 24=(\\w*?) 1B=(.*?)\\}/);5.C=L.$1;5.27=L.$2;5.1P=1r};2Z.z.M=7(d,h,q,I){1k{h[5.C]=5.1P.10().19(d,h,q,5.27)}1l(e){6(j.J||(e 1C 16)){E e;}h[5.C]=D}c\'\'};9 30=7(N,1r){N.1j(/\\{#9 (.*?)\\}/);5.43=L.$1;5.1P=1r};30.z.M=7(d,h,q,I){1k{6(q==D){c""}9 25=5.1P.10().19(d,h,q,5.43);9 1U=b.G(q,"2o");6(1U==D){1U={1y:(++j.1y),d:[]}}9 i=1U.d.x(25);b.G(q,"2o",1U);c"(R.3M(5,"+1U.1y+","+(i-1)+"))"}1l(e){6(j.J||(e 1C 16)){E e;}c\'\'}};9 32=7(N){N.1j(/\\{#31 50=(.*?)\\}/);5.3j=3d(L.$1);5.3k=5.3j.X;6(5.3k<=0){E p V(\'14: 51 52 K 31\');}5.3l=0;5.3m=-1};32.z.M=7(d,h,q,I){9 3n=b.G(q,\'2x\');6(3n!=5.3m){5.3m=3n;5.3l=0}9 i=5.3l++%5.3k;c 5.3j[i]};b.1e.1F=7(s,H,m){c b(5).1t(7(){9 t=(s&&s.36==j)?s:p j(s,H,m);b.G(5,\'2c\',t);b.G(5,\'2x\',0)})};b.1e.53=7(1V,H,m){9 s=b.2y({1w:1V,2z:\'2A\',2B:1b,1m:\'44\'}).45;c b(5).1F(s,H,m)};b.1e.54=7(3o,H,m){9 s=b(\'#\'+3o).3b();6(s==u){s=b(\'#\'+3o).46();s=s.15(/&3J;/g,"<").15(/&3I;/g,">")}s=b.3L(s);s=s.15(/^<\\!\\[55\\[([\\s\\S]*)\\]\\]>$/47,\'$1\');s=s.15(/^<\\!--([\\s\\S]*)-->$/47,\'$1\');c b(5).1F(s,H,m)};b.1e.56=7(){9 2f=0;b(5).1t(7(){6(b.2C(5)){++2f}});c 2f};b.1e.57=7(){b(5).48();c b(5).1t(7(){b.34(5,\'2c\')})};b.1e.35=7(24,1B){c b(5).1t(7(){9 t=b.2C(5);6(t!=u){t.35(24,1B)}W 6(j.J){E p V(\'14: j 2Q 2k 49.\');}})};b.1e.3p=7(d,h,1o){c b(5).1t(7(){9 t=b.2C(5);6(t!=u){6(1o!=D&&1o.3q){d=t.2h(d)}b.G(5,\'2x\',b.G(5,\'2x\')+1);b(5).46(t.M(d,h,5,0))}W 6(j.J){E p V(\'14: j 2Q 2k 49.\');}})};b.1e.58=7(1V,h,1o){9 12=5;9 o=b.1i({2D:1b},b.59);o=b.1i(o,1o);b.2y({1w:1V,1m:o.1m,G:o.G,4a:o.4a,2B:o.2B,2D:o.2D,4b:o.4b,2z:\'2A\',4c:7(d){9 r=b(12).3p(d,h,{3q:1x});6(o.2E){o.2E(r)}},5a:o.5b,5c:o.5d});c 5};9 3r=7(1w,h,2F,2G,1f,1o){5.4d=1w;5.1D=h;5.4e=2F;5.4f=2G;5.1f=1f;5.4g=u;5.3s=1o||{};9 12=5;b(1f).1t(7(){b.G(5,\'3t\',12)});5.3u()};3r.z.3u=7(){5.1f=b.4h(5.1f,7(2H){c(b.5e(5f.5g,2H.5h?2H[0]:2H))});6(5.1f.X===0){c}9 12=5;b.2y({1w:5.4d,2z:\'2A\',G:5.4f,2D:1b,4c:7(d){1k{9 r=b(12.1f).3p(d,12.1D,{3q:1x});6(12.3s.2E){12.3s.2E(r)}}1l(1T){}}});5.4g=5i(7(){12.3u()},5.4e)};b.1e.5j=7(1w,h,2F,2G,1o){c p 3r(1w,h,2F,2G,5,1o)};b.1e.48=7(){c b(5).1t(7(){9 2I=b.G(5,\'3t\');6(2I==u){c}9 12=5;2I.1f=b.4h(2I.1f,7(o){c o!=12});b.34(5,\'3t\')})};b.1i({3w:7(s,H,m){c p j(s,H,m)},5k:7(1V,H,m){9 s=b.2y({1w:1V,2z:\'2A\',2B:1b,1m:\'44\'}).45;c p j(s,H,m)},2C:7(q){c b.G(q,\'2c\')},5l:7(1c,G,4i){c 1c.M(G,4i,D,0)},5m:7(1B){j.J=1B}})})(b)};',62,333,'|||||this|if|function||var||jQuery|return|||||param||Template|||settings|||new|element||||null|||push|extData|prototype|node|case|_name|undefined|throw|break|data|includes|deep|DEBUG_MODE|for|RegExp|get|oper|_template|||TemplateUtils|||se|Error|else|length|_option|this_op|getBin||that|f_escapeString|jTemplates|replace|JTException|ret|result|evaluate|step|false|template|ss|fn|objs|_tree|_templates_code|extend|match|try|catch|type|cval|options|TextNode|literalMode|templ|fcount|each|ckey|delete|url|true|guid|opIF|opFOREACH|value|instanceof|_param|f_cloneData|setTemplate|tname|lastIndex|literal|filter|typeof|sExpr|lm|rm|par|_templ|_curr|mode|iteration|ex|refobj|url_|_templates|disallow_functions|indexOf|substring|op|end|continue|noFunc|name|obj|el|_value|nested|sText|_cond|ci|jTemplate|key|Number|count|cloneData|f_parseJSON|MAIN|iter|not|in|Object|op_|jTemplatesRef|escapeData|EvalObj|EvalClass|optionText|__value|_parent|_onTrue|_onFalse|jTemplateSID|ajax|dataType|text|async|getTemplate|cache|on_success|interval|args|elem|updater|_includes|filter_params|runnable_functions|parseJSON|reg|_template_settings|while|is|optionToObject|switch|addCond|switchToElse|foreach|getParent|include|Include|UserParam|UserVariable|cycle|Cycle|begin|removeData|setParam|constructor|toString|String||id|val|__templ|eval|_runFunc|_currentState|arr|tmp|loopCounter|_values|_length|_index|_lastSessionID|sid|elementName|processTemplate|StrToJSON|Updater|_options|jTemplateUpdater|run|window|createTemplate|filter_data|clone_data|clone_params|escapeHTML|splitTemplates|FOREACH_LOOP_LIMIT|of|opFORFactory|default|substr|txt|gt|lt|Function|trim|ReturnRefValue|_literalMode|evaluateContent|cl|find|as|_arg|loop|object|_total|prevValue|index|first|last|total|_root|_mainTempl|_id|GET|responseText|html|im|processTemplateStop|defined|dataFilter|timeout|success|_url|_interval|_args|timer|grep|parameter|version|10000|exec|closed|No|inArray|elseif|ldelim|rdelim|Missing|unknown|tag|amp|quot|hasOwnProperty|Array|Functions|are|allowed|split|shift|string|Invalid|JSON|parentNode|isFunction|subtemplate|to|Operator|failed|Variable|cannot|be|used|MAX_VALUE|Math|ceil|Foreach|limit|was|exceed|root|Cannot|values|no|elements|setTemplateURL|setTemplateElement|CDATA|hasTemplate|removeTemplate|processTemplateURL|ajaxSettings|error|on_error|complete|on_complete|contains|document|body|jquery|setTimeout|processTemplateStart|createTemplateURL|processTemplateToText|jTemplatesDebugMode'.split('|'),0,{}))
New to GrepCode? Check out our FAQ X