ZIWAUA0/KursR/Rodział 4/Ćwiczenie-421_Notebook.html

1695 lines
680 KiB
HTML
Raw Normal View History

2020-04-16 20:34:53 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title>R Notebook</title>
<script>/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each(
return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</tex
return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h
</script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(data:application/vnd.ms-fontobject;base64,n04AAEFNAAACAAIABAAAAAAABQAAAAAAAAABAJABAAAEAExQAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAJxJ/LAAAAAAAAAAAAAAAAAAAAAAAACgARwBMAFkAUABIAEkAQwBPAE4AUwAgAEgAYQBsAGYAbABpAG4AZwBzAAAADgBSAGUAZwB1AGwAYQByAAAAeABWAGUAcgBzAGkAbwBuACAAMQAuADAAMAA5ADsAUABTACAAMAAwADEALgAwADAAOQA7AGgAbwB0AGMAbwBuAHYAIAAxAC4AMAAuADcAMAA7AG0AYQBrAGUAbwB0AGYALgBsAGkAYgAyAC4ANQAuADUAOAAzADIAOQAAADgARwBMAFkAUABIAEkAQwBPAE4AUwAgAEgAYQBsAGYAbABpAG4AZwBzACAAUgBlAGcAdQBsAGEAcgAAAAAAQlNHUAAAAAAAAAAAAAAAAAAAAAADAKncAE0TAE0ZAEbuFM3pjM/SEdmjKHUbyow8ATBE40IvWA3vTu8LiABDQ+pexwUMcm1SMnNryctQSiI1K5ZnbOlXKmnVV5YvRe6RnNMFNCOs1KNVpn6yZhCJkRtVRNzEufeIq7HgSrcx4S8h/v4vnrrKc6oCNxmSk2uKlZQHBii6iKFoH0746ThvkO1kJHlxjrkxs+LWORaDQBEtiYJIR5IB9Bi1UyL4Rmr0BNigNkMzlKQmnofBHviqVzUxwdMb3NdCn69hy+pRYVKGVS/1tnsqv4LL7wCCPZZAZPT4aCShHjHJVNuXbmMrY5LeQaGnvAkXlVrJgKRAUdFjrWEah9XebPeQMj7KS7DIBAFt8ycgC5PLGUOHSE3ErGZCiViNLL5ZARfywnCoZaKQCu6NuFX42AEeKtKUGnr/Cm2Cy8tpFhBPMW5Fxi4Qm4TkDWh4IWFDClhU2hRWosUWqcKLlgyXB+lSHaWaHiWlBAR8SeSgSPCQxdVQgzUixWKSTrIQEbU94viDctkvX+VSjJuUmV8L4CXShI11esnp0pjWNZIyxKHS4wVQ2ime1P4RnhvGw0aDN1OLAXGERsB7buFpFGGBAre4QEQR0HOIO5oYH305G+KspT/FupEGGafCCwxSe6ZUa+073rXHnNdVXE6eW
</style>
<script>/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==type
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affi
<script>/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
};
</script>
<script>/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmVal
};
</script>
<script>
/**
* jQuery Plugin: Sticky Tabs
*
* @author Aidan Lister <aidan@php.net>
* adapted by Ruben Arslan to activate parent tabs too
* http://www.aidanlister.com/2014/03/persisting-the-tab-state-in-bootstrap/
*/
(function($) {
"use strict";
$.fn.rmarkdownStickyTabs = function() {
var context = this;
// Show the tab corresponding with the hash in the URL, or the first tab
var showStuffFromHash = function() {
var hash = window.location.hash;
var selector = hash ? 'a[href="' + hash + '"]' : 'li.active > a';
var $selector = $(selector, context);
if($selector.data('toggle') === "tab") {
$selector.tab('show');
// walk up the ancestors of this element, show any hidden tabs
$selector.parents('.section.tabset').each(function(i, elm) {
var link = $('a[href="#' + $(elm).attr('id') + '"]');
if(link.data('toggle') === "tab") {
link.tab("show");
}
});
}
};
// Set the correct tab when the page loads
showStuffFromHash(context);
// Set the correct tab when a user uses their back/forward button
$(window).on('hashchange', function() {
showStuffFromHash(context);
});
// Change the URL when tabs are clicked
$('a', context).on('click', function(e) {
history.pushState(null, null, this.href);
showStuffFromHash(context);
});
return this;
};
}(jQuery));
window.buildTabsets = function(tocID) {
// build a tabset from a section div with the .tabset class
function buildTabset(tabset) {
// check for fade and pills options
var fade = tabset.hasClass("tabset-fade");
var pills = tabset.hasClass("tabset-pills");
var navClass = pills ? "nav-pills" : "nav-tabs";
// determine the heading level of the tabset and tabs
var match = tabset.attr('class').match(/level(\d) /);
if (match === null)
return;
var tabsetLevel = Number(match[1]);
var tabLevel = tabsetLevel + 1;
// find all subheadings immediately below
var tabs = tabset.find("div.section.level" + tabLevel);
if (!tabs.length)
return;
// create tablist and tab-content elements
var tabList = $('<ul class="nav ' + navClass + '" role="tablist"></ul>');
$(tabs[0]).before(tabList);
var tabContent = $('<div class="tab-content"></div>');
$(tabs[0]).before(tabContent);
// build the tabset
var activeTab = 0;
tabs.each(function(i) {
// get the tab div
var tab = $(tabs[i]);
// get the id then sanitize it for use with bootstrap tabs
var id = tab.attr('id');
// see if this is marked as the active tab
if (tab.hasClass('active'))
activeTab = i;
// remove any table of contents entries associated with
// this ID (since we'll be removing the heading element)
$("div#" + tocID + " li a[href='#" + id + "']").parent().remove();
// sanitize the id for use with bootstrap tabs
id = id.replace(/[.\/?&!#<>]/g, '').replace(/\s/g, '_');
tab.attr('id', id);
// get the heading element within it, grab it's text, then remove it
var heading = tab.find('h' + tabLevel + ':first');
var headingText = heading.html();
heading.remove();
// build and append the tab list item
var a = $('<a role="tab" data-toggle="tab">' + headingText + '</a>');
a.attr('href', '#' + id);
a.attr('aria-controls', id);
var li = $('<li role="presentation"></li>');
li.append(a);
tabList.append(li);
// set it's attributes
tab.attr('role', 'tabpanel');
tab.addClass('tab-pane');
tab.addClass('tabbed-pane');
if (fade)
tab.addClass('fade');
// move it into the tab content div
tab.detach().appendTo(tabContent);
});
// set active tab
$(tabList.children('li')[activeTab]).addClass('active');
var active = $(tabContent.children('div.section')[activeTab]);
active.addClass('active');
if (fade)
active.addClass('in');
if (tabset.hasClass("tabset-sticky"))
tabset.rmarkdownStickyTabs();
}
// convert section divs with the .tabset class to tabsets
var tabsets = $("div.section.tabset");
tabsets.each(function(i) {
buildTabset($(tabsets[i]));
});
};
</script>
<style type="text/css">.hljs-literal {
color: #990073;
}
.hljs-number {
color: #099;
}
.hljs-comment {
color: #998;
font-style: italic;
}
.hljs-keyword {
color: #900;
font-weight: bold;
}
.hljs-string {
color: #d14;
}
</style>
<script src="data:application/javascript;base64,LyohIGhpZ2hsaWdodC5qcyB2OS4xMi4wIHwgQlNEMyBMaWNlbnNlIHwgZ2l0LmlvL2hsanNsaWNlbnNlICovCiFmdW5jdGlvbihlKXt2YXIgbj0ib2JqZWN0Ij09dHlwZW9mIHdpbmRvdyYmd2luZG93fHwib2JqZWN0Ij09dHlwZW9mIHNlbGYmJnNlbGY7InVuZGVmaW5lZCIhPXR5cGVvZiBleHBvcnRzP2UoZXhwb3J0cyk6biYmKG4uaGxqcz1lKHt9KSwiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kJiZkZWZpbmUoW10sZnVuY3Rpb24oKXtyZXR1cm4gbi5obGpzfSkpfShmdW5jdGlvbihlKXtmdW5jdGlvbiBuKGUpe3JldHVybiBlLnJlcGxhY2UoLyYvZywiJmFtcDsiKS5yZXBsYWNlKC88L2csIiZsdDsiKS5yZXBsYWNlKC8+L2csIiZndDsiKX1mdW5jdGlvbiB0KGUpe3JldHVybiBlLm5vZGVOYW1lLnRvTG93ZXJDYXNlKCl9ZnVuY3Rpb24gcihlLG4pe3ZhciB0PWUmJmUuZXhlYyhuKTtyZXR1cm4gdCYmMD09PXQuaW5kZXh9ZnVuY3Rpb24gYShlKXtyZXR1cm4gay50ZXN0KGUpfWZ1bmN0aW9uIGkoZSl7dmFyIG4sdCxyLGksbz1lLmNsYXNzTmFtZSsiICI7aWYobys9ZS5wYXJlbnROb2RlP2UucGFyZW50Tm9kZS5jbGFzc05hbWU6IiIsdD1CLmV4ZWMobykpcmV0dXJuIHcodFsxXSk/dFsxXToibm8taGlnaGxpZ2h0Ijtmb3Iobz1vLnNwbGl0KC9ccys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;
padding-right: 8px;
}
.pagedtable-wrapper {
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 10px;
}
.pagedtable table {
width: 100%;
max-width: 100%;
margin: 0;
}
.pagedtable th {
padding: 0 5px 0 5px;
border: none;
border-bottom: 2px solid #dddddd;
min-width: 45px;
}
.pagedtable-empty th {
display: none;
}
.pagedtable td {
padding: 0 4px 0 4px;
}
.pagedtable .even {
background-color: rgba(140, 140, 140, 0.1);
}
.pagedtable-padding-col {
display: none;
}
.pagedtable a {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.pagedtable-index-nav {
cursor: pointer;
padding: 0 5px 0 5px;
float: right;
border: 0;
}
.pagedtable-index-nav-disabled {
cursor: default;
text-decoration: none;
color: #999;
}
a.pagedtable-index-nav-disabled:hover {
text-decoration: none;
color: #999;
}
.pagedtable-indexes {
cursor: pointer;
float: right;
border: 0;
}
.pagedtable-index-current {
cursor: default;
text-decoration: none;
font-weight: bold;
color: #333;
border: 0;
}
a.pagedtable-index-current:hover {
text-decoration: none;
font-weight: bold;
color: #333;
}
.pagedtable-index {
width: 30px;
display: inline-block;
text-align: center;
border: 0;
}
.pagedtable-index-separator-left {
display: inline-block;
color: #333;
font-size: 9px;
padding: 0 0 0 0;
cursor: default;
}
.pagedtable-index-separator-right {
display: inline-block;
color: #333;
font-size: 9px;
padding: 0 4px 0 0;
cursor: default;
}
.pagedtable-footer {
padding-top: 4px;
padding-bottom: 5px;
}
.pagedtable-not-empty .pagedtable-footer {
border-top: 2px solid #dddddd;
}
.pagedtable-info {
overflow: hidden;
color: #999;
white-space: nowrap;
text-overflow: ellipsis;
}
.pagedtable-header-name {
overflow: hidden;
text-overflow: ellipsis;
}
.pagedtable-header-type {
color: #999;
font-weight: 400;
}
.pagedtable-na-cell {
font-style: italic;
opacity: 0.3;
}
</style>
<script>// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.io/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback, thisArg) {
var T, k;
if (this === null) {
throw new TypeError(' this is null or not defined');
}
// 1. Let O be the result of calling toObject() passing the
// |this| value as the argument.
var O = Object(this);
// 2. Let lenValue be the result of calling the Get() internal
// method of O with the argument "length".
// 3. Let len be toUint32(lenValue).
var len = O.length >>> 0;
// 4. If isCallable(callback) is false, throw a TypeError exception.
// See: http://es5.github.com/#x9.11
if (typeof callback !== "function") {
throw new TypeError(callback + ' is not a function');
}
// 5. If thisArg was supplied, let T be thisArg; else let
// T be undefined.
if (arguments.length > 1) {
T = thisArg;
}
// 6. Let k be 0
k = 0;
// 7. Repeat, while k < len
while (k < len) {
var kValue;
// a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the HasProperty
// internal method of O with argument Pk.
// This step can be combined with c
// c. If kPresent is true, then
if (k in O) {
// i. Let kValue be the result of calling the Get internal
// method of O with argument Pk.
kValue = O[k];
// ii. Call the Call internal method of callback with T as
// the this value and argument list containing kValue, k, and O.
callback.call(T, kValue, k, O);
}
// d. Increase k by 1.
k++;
}
// 8. return undefined
};
}
// Production steps of ECMA-262, Edition 5, 15.4.4.19
// Reference: http://es5.github.io/#x15.4.4.19
if (!Array.prototype.map) {
Array.prototype.map = function(callback, thisArg) {
var T, A, k;
if (this == null) {
throw new TypeError(' this is null or not defined');
}
// 1. Let O be the result of calling ToObject passing the |this|
// value as the argument.
var O = Object(this);
// 2. Let lenValue be the result of calling the Get internal
// method of O with the argument "length".
// 3. Let len be ToUint32(lenValue).
var len = O.length >>> 0;
// 4. If IsCallable(callback) is false, throw a TypeError exception.
// See: http://es5.github.com/#x9.11
if (typeof callback !== 'function') {
throw new TypeError(callback + ' is not a function');
}
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
if (arguments.length > 1) {
T = thisArg;
}
// 6. Let A be a new array created as if by the expression new Array(len)
// where Array is the standard built-in constructor with that name and
// len is the value of len.
A = new Array(len);
// 7. Let k be 0
k = 0;
// 8. Repeat, while k < len
while (k < len) {
var kValue, mappedValue;
// a. Let Pk be ToString(k).
// This is implicit for LHS operands of the in operator
// b. Let kPresent be the result of calling the HasProperty internal
// method of O with argument Pk.
// This step can be combined with c
// c. If kPresent is true, then
if (k in O) {
// i. Let kValue be the result of calling the Get internal
// method of O with argument Pk.
kValue = O[k];
// ii. Let mappedValue be the result of calling the Call internal
// method of callback with T as the this value and argument
// list containing kValue, k, and O.
mappedValue = callback.call(T, kValue, k, O);
// iii. Call the DefineOwnProperty internal method of A with arguments
// Pk, Property Descriptor
// { Value: mappedValue,
// Writable: true,
// Enumerable: true,
// Configurable: true },
// and false.
// In browsers that support Object.defineProperty, use the following:
// Object.defineProperty(A, k, {
// value: mappedValue,
// writable: true,
// enumerable: true,
// configurable: true
// });
// For best browser support, use the following:
A[k] = mappedValue;
}
// d. Increase k by 1.
k++;
}
// 9. return A
return A;
};
}
var PagedTable = function (pagedTable) {
var me = this;
var source = function(pagedTable) {
var sourceElems = [].slice.call(pagedTable.children).filter(function(e) {
return e.hasAttribute("data-pagedtable-source");
});
if (sourceElems === null || sourceElems.length !== 1) {
throw("A single data-pagedtable-source was not found");
}
return JSON.parse(sourceElems[0].innerHTML);
}(pagedTable);
var options = function(source) {
var options = typeof(source.options) !== "undefined" &&
source.options !== null ? source.options : {};
var columns = typeof(options.columns) !== "undefined" ? options.columns : {};
var rows = typeof(options.rows) !== "undefined" ? options.rows : {};
var positiveIntOrNull = function(value) {
return parseInt(value) >= 0 ? parseInt(value) : null;
};
return {
pages: positiveIntOrNull(options.pages),
rows: {
min: positiveIntOrNull(rows.min),
max: positiveIntOrNull(rows.max),
total: positiveIntOrNull(rows.total)
},
columns: {
min: positiveIntOrNull(columns.min),
max: positiveIntOrNull(columns.max),
total: positiveIntOrNull(columns.total)
}
};
}(source);
var Measurer = function() {
// set some default initial values that will get adjusted in runtime
me.measures = {
padding: 12,
character: 8,
height: 15,
defaults: true
};
me.calculate = function(measuresCell) {
if (!me.measures.defaults)
return;
var measuresCellStyle = window.getComputedStyle(measuresCell, null);
var newPadding = parsePadding(measuresCellStyle.paddingLeft) +
parsePadding(measuresCellStyle.paddingRight);
var sampleString = "ABCDEFGHIJ0123456789";
var newCharacter = Math.ceil(measuresCell.clientWidth / sampleString.length);
if (newPadding <= 0 || newCharacter <= 0)
return;
me.measures.padding = newPadding;
me.measures.character = newCharacter;
me.measures.height = measuresCell.clientHeight;
me.measures.defaults = false;
};
return me;
};
var Page = function(data, options) {
var me = this;
var defaults = {
max: 7,
rows: 10
};
var totalPages = function() {
return Math.ceil(data.length / me.rows);
};
me.number = 0;
me.max = options.pages !== null ? options.pages : defaults.max;
me.visible = me.max;
me.rows = options.rows.min !== null ? options.rows.min : defaults.rows;
me.total = totalPages();
me.setRows = function(newRows) {
me.rows = newRows;
me.total = totalPages();
};
me.setPageNumber = function(newPageNumber) {
if (newPageNumber < 0) newPageNumber = 0;
if (newPageNumber >= me.total) newPageNumber = me.total - 1;
me.number = newPageNumber;
};
me.setVisiblePages = function(visiblePages) {
me.visible = Math.min(me.max, visiblePages);
me.setPageNumber(me.number);
};
me.getVisiblePageRange = function() {
var start = me.number - Math.max(Math.floor((me.visible - 1) / 2), 0);
var end = me.number + Math.floor(me.visible / 2) + 1;
var pageCount = me.total;
if (start < 0) {
var diffToStart = 0 - start;
start += diffToStart;
end += diffToStart;
}
if (end > pageCount) {
var diffToEnd = end - pageCount;
start -= diffToEnd;
end -= diffToEnd;
}
start = start < 0 ? 0 : start;
end = end >= pageCount ? pageCount : end;
var first = false;
var last = false;
if (start > 0 && me.visible > 1) {
start = start + 1;
first = true;
}
if (end < pageCount && me.visible > 2) {
end = end - 1;
last = true;
}
return {
first: first,
start: start,
end: end,
last: last
};
};
me.getRowStart = function() {
var rowStart = page.number * page.rows;
if (rowStart < 0)
rowStart = 0;
return rowStart;
};
me.getRowEnd = function() {
var rowStart = me.getRowStart();
return Math.min(rowStart + me.rows, data.length);
};
me.getPaddingRows = function() {
var rowStart = me.getRowStart();
var rowEnd = me.getRowEnd();
return data.length > me.rows ? me.rows - (rowEnd - rowStart) : 0;
};
};
var Columns = function(data, columns, options) {
var me = this;
me.defaults = {
min: 5
};
me.number = 0;
me.visible = 0;
me.total = columns.length;
me.subset = [];
me.padding = 0;
me.min = options.columns.min !== null ? options.columns.min : me.defaults.min;
me.max = options.columns.max !== null ? options.columns.max : null;
me.widths = {};
var widthsLookAhead = Math.max(100, options.rows.min);
var paddingColChars = 10;
me.emptyNames = function() {
columns.forEach(function(column) {
if (columns.label !== null && columns.label !== "")
return false;
});
return true;
};
var parsePadding = function(value) {
return parseInt(value) >= 0 ? parseInt(value) : 0;
};
me.calculateWidths = function(measures) {
columns.forEach(function(column) {
var maxChars = Math.max(
column.label.toString().length,
column.type.toString().length
);
for (var idxRow = 0; idxRow < Math.min(widthsLookAhead, data.length); idxRow++) {
maxChars = Math.max(maxChars, data[idxRow][column.name.toString()].length);
}
me.widths[column.name] = {
// width in characters
chars: maxChars,
// width for the inner html columns
inner: maxChars * measures.character,
// width adding outer styles like padding
outer: maxChars * measures.character + measures.padding
};
});
};
me.getWidth = function() {
var widthOuter = 0;
for (var idxCol = 0; idxCol < me.subset.length; idxCol++) {
var columnName = me.subset[idxCol].name;
widthOuter = widthOuter + me.widths[columnName].outer;
}
widthOuter = widthOuter + me.padding * paddingColChars * measurer.measures.character;
if (me.hasMoreLeftColumns()) {
widthOuter = widthOuter + columnNavigationWidthPX + measurer.measures.padding;
}
if (me.hasMoreRightColumns()) {
widthOuter = widthOuter + columnNavigationWidthPX + measurer.measures.padding;
}
return widthOuter;
};
me.updateSlice = function() {
if (me.number + me.visible >= me.total)
me.number = me.total - me.visible;
if (me.number < 0) me.number = 0;
me.subset = columns.slice(me.number, Math.min(me.number + me.visible, me.total));
me.subset = me.subset.map(function(column) {
Object.keys(column).forEach(function(colKey) {
column[colKey] = column[colKey] === null ? "" : column[colKey].toString();
});
column.width = null;
return column;
});
};
me.setVisibleColumns = function(columnNumber, newVisibleColumns, paddingCount) {
me.number = columnNumber;
me.visible = newVisibleColumns;
me.padding = paddingCount;
me.updateSlice();
};
me.incColumnNumber = function(increment) {
me.number = me.number + increment;
};
me.setColumnNumber = function(newNumber) {
me.number = newNumber;
};
me.setPaddingCount = function(newPadding) {
me.padding = newPadding;
};
me.getPaddingCount = function() {
return me.padding;
};
me.hasMoreLeftColumns = function() {
return me.number > 0;
};
me.hasMoreRightColumns = function() {
return me.number + me.visible < me.total;
};
me.updateSlice(0);
return me;
};
var data = source.data;
var page = new Page(data, options);
var measurer = new Measurer(data, options);
var columns = new Columns(data, source.columns, options);
var table = null;
var tableDiv = null;
var header = null;
var footer = null;
var tbody = null;
// Caches pagedTable.clientWidth, specially for webkit
var cachedPagedTableClientWidth = null;
var onChangeCallbacks = [];
var clearSelection = function() {
if(document.selection && document.selection.empty) {
document.selection.empty();
} else if(window.getSelection) {
var sel = window.getSelection();
sel.removeAllRanges();
}
};
var columnNavigationWidthPX = 5;
var renderColumnNavigation = function(increment, backwards) {
var arrow = document.createElement("div");
arrow.setAttribute("style",
"border-top: " + columnNavigationWidthPX + "px solid transparent;" +
"border-bottom: " + columnNavigationWidthPX + "px solid transparent;" +
"border-" + (backwards ? "right" : "left") + ": " + columnNavigationWidthPX + "px solid;");
var header = document.createElement("th");
header.appendChild(arrow);
header.setAttribute("style",
"cursor: pointer;" +
"vertical-align: middle;" +
"min-width: " + columnNavigationWidthPX + "px;" +
"width: " + columnNavigationWidthPX + "px;");
header.onclick = function() {
columns.incColumnNumber(backwards ? -1 : increment);
me.animateColumns(backwards);
renderFooter();
clearSelection();
triggerOnChange();
};
return header;
};
var maxColumnWidth = function(width) {
var padding = 80;
var columnMax = Math.max(cachedPagedTableClientWidth - padding, 0);
return parseInt(width) > 0 ?
Math.min(columnMax, parseInt(width)) + "px" :
columnMax + "px";
};
var clearHeader = function() {
var thead = pagedTable.querySelectorAll("thead")[0];
thead.innerHTML = "";
};
var renderHeader = function(clear) {
cachedPagedTableClientWidth = pagedTable.clientWidth;
var fragment = document.createDocumentFragment();
header = document.createElement("tr");
fragment.appendChild(header);
if (columns.number > 0)
header.appendChild(renderColumnNavigation(-columns.visible, true));
columns.subset = columns.subset.map(function(columnData) {
var column = document.createElement("th");
column.setAttribute("align", columnData.align);
column.style.textAlign = columnData.align;
column.style.maxWidth = maxColumnWidth(null);
if (columnData.width) {
column.style.minWidth =
column.style.maxWidth = maxColumnWidth(columnData.width);
}
var columnName = document.createElement("div");
columnName.setAttribute("class", "pagedtable-header-name");
if (columnData.label === "") {
columnName.innerHTML = "&nbsp;";
}
else {
columnName.appendChild(document.createTextNode(columnData.label));
}
column.appendChild(columnName);
var columnType = document.createElement("div");
columnType.setAttribute("class", "pagedtable-header-type");
if (columnData.type === "") {
columnType.innerHTML = "&nbsp;";
}
else {
columnType.appendChild(document.createTextNode("<" + columnData.type + ">"));
}
column.appendChild(columnType);
header.appendChild(column);
columnData.element = column;
return columnData;
});
for (var idx = 0; idx < columns.getPaddingCount(); idx++) {
var paddingCol = document.createElement("th");
paddingCol.setAttribute("class", "pagedtable-padding-col");
header.appendChild(paddingCol);
}
if (columns.number + columns.visible < columns.total)
header.appendChild(renderColumnNavigation(columns.visible, false));
if (typeof(clear) == "undefined" || clear) clearHeader();
var thead = pagedTable.querySelectorAll("thead")[0];
thead.appendChild(fragment);
};
me.animateColumns = function(backwards) {
var thead = pagedTable.querySelectorAll("thead")[0];
var headerOld = thead.querySelectorAll("tr")[0];
var tbodyOld = table.querySelectorAll("tbody")[0];
me.fitColumns(backwards);
renderHeader(false);
header.style.opacity = "0";
header.style.transform = backwards ? "translateX(-30px)" : "translateX(30px)";
header.style.transition = "transform 200ms linear, opacity 200ms";
header.style.transitionDelay = "0";
renderBody(false);
if (headerOld) {
headerOld.style.position = "absolute";
headerOld.style.transform = "translateX(0px)";
headerOld.style.opacity = "1";
headerOld.style.transition = "transform 100ms linear, opacity 100ms";
headerOld.setAttribute("class", "pagedtable-remove-head");
if (headerOld.style.transitionEnd) {
headerOld.addEventListener("transitionend", function() {
var headerOldByClass = thead.querySelector(".pagedtable-remove-head");
if (headerOldByClass) thead.removeChild(headerOldByClass);
});
}
else {
thead.removeChild(headerOld);
}
}
if (tbodyOld) table.removeChild(tbodyOld);
tbody.style.opacity = "0";
tbody.style.transition = "transform 200ms linear, opacity 200ms";
tbody.style.transitionDelay = "0ms";
// force relayout
window.getComputedStyle(header).opacity;
window.getComputedStyle(tbody).opacity;
if (headerOld) {
headerOld.style.transform = backwards ? "translateX(20px)" : "translateX(-30px)";
headerOld.style.opacity = "0";
}
header.style.transform = "translateX(0px)";
header.style.opacity = "1";
tbody.style.opacity = "1";
}
me.onChange = function(callback) {
onChangeCallbacks.push(callback);
};
var triggerOnChange = function() {
onChangeCallbacks.forEach(function(onChange) {
onChange();
});
};
var clearBody = function() {
if (tbody) {
table.removeChild(tbody);
tbody = null;
}
};
var renderBody = function(clear) {
cachedPagedTableClientWidth = pagedTable.clientWidth
var fragment = document.createDocumentFragment();
var pageData = data.slice(page.getRowStart(), page.getRowEnd());
pageData.forEach(function(dataRow, idxRow) {
var htmlRow = document.createElement("tr");
htmlRow.setAttribute("class", (idxRow % 2 !==0) ? "even" : "odd");
if (columns.hasMoreLeftColumns())
htmlRow.appendChild(document.createElement("td"));
columns.subset.forEach(function(columnData) {
var cellName = columnData.name;
var dataCell = dataRow[cellName];
var htmlCell = document.createElement("td");
if (dataCell === "NA") htmlCell.setAttribute("class", "pagedtable-na-cell");
if (dataCell === "__NA__") dataCell = "NA";
var cellText = document.createTextNode(dataCell);
htmlCell.appendChild(cellText);
if (dataCell.length > 50) {
htmlCell.setAttribute("title", dataCell);
}
htmlCell.setAttribute("align", columnData.align);
htmlCell.style.textAlign = columnData.align;
htmlCell.style.maxWidth = maxColumnWidth(null);
if (columnData.width) {
htmlCell.style.minWidth = htmlCell.style.maxWidth = maxColumnWidth(columnData.width);
}
htmlRow.appendChild(htmlCell);
});
for (var idx = 0; idx < columns.getPaddingCount(); idx++) {
var paddingCol = document.createElement("td");
paddingCol.setAttribute("class", "pagedtable-padding-col");
htmlRow.appendChild(paddingCol);
}
if (columns.hasMoreRightColumns())
htmlRow.appendChild(document.createElement("td"));
fragment.appendChild(htmlRow);
});
for (var idxPadding = 0; idxPadding < page.getPaddingRows(); idxPadding++) {
var paddingRow = document.createElement("tr");
var paddingCellRow = document.createElement("td");
paddingCellRow.innerHTML = "&nbsp;";
paddingCellRow.setAttribute("colspan", "100%");
paddingRow.appendChild(paddingCellRow);
fragment.appendChild(paddingRow);
}
if (typeof(clear) == "undefined" || clear) clearBody();
tbody = document.createElement("tbody");
tbody.appendChild(fragment);
table.appendChild(tbody);
};
var getLabelInfo = function() {
var pageStart = page.getRowStart();
var pageEnd = page.getRowEnd();
var totalRows = data.length;
var totalRowsLabel = options.rows.total ? options.rows.total : totalRows;
var totalRowsLabelFormat = totalRowsLabel.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
var infoText = (pageStart + 1) + "-" + pageEnd + " of " + totalRowsLabelFormat + " rows";
if (totalRows < page.rows) {
infoText = totalRowsLabel + " row" + (totalRows != 1 ? "s" : "");
}
if (columns.total > columns.visible) {
var totalColumnsLabel = options.columns.total ? options.columns.total : columns.total;
infoText = infoText + " | " + (columns.number + 1) + "-" +
(Math.min(columns.number + columns.visible, columns.total)) +
" of " + totalColumnsLabel + " columns";
}
return infoText;
};
var clearFooter = function() {
footer = pagedTable.querySelectorAll("div.pagedtable-footer")[0];
footer.innerHTML = "";
return footer;
};
var createPageLink = function(idxPage) {
var pageLink = document.createElement("a");
pageLinkClass = idxPage === page.number ? "pagedtable-index pagedtable-index-current" : "pagedtable-index";
pageLink.setAttribute("class", pageLinkClass);
pageLink.setAttribute("data-page-index", idxPage);
pageLink.onclick = function() {
page.setPageNumber(parseInt(this.getAttribute("data-page-index")));
renderBody();
renderFooter();
triggerOnChange();
};
pageLink.appendChild(document.createTextNode(idxPage + 1));
return pageLink;
}
var renderFooter = function() {
footer = clearFooter();
var next = document.createElement("a");
next.appendChild(document.createTextNode("Next"));
next.onclick = function() {
page.setPageNumber(page.number + 1);
renderBody();
renderFooter();
triggerOnChange();
};
if (data.length > page.rows) footer.appendChild(next);
var pageNumbers = document.createElement("div");
pageNumbers.setAttribute("class", "pagedtable-indexes");
var pageRange = page.getVisiblePageRange();
if (pageRange.first) {
var pageLink = createPageLink(0);
pageNumbers.appendChild(pageLink);
var pageSeparator = document.createElement("div");
pageSeparator.setAttribute("class", "pagedtable-index-separator-left");
pageSeparator.appendChild(document.createTextNode("..."))
pageNumbers.appendChild(pageSeparator);
}
for (var idxPage = pageRange.start; idxPage < pageRange.end; idxPage++) {
var pageLink = createPageLink(idxPage);
pageNumbers.appendChild(pageLink);
}
if (pageRange.last) {
var pageSeparator = document.createElement("div");
pageSeparator.setAttribute("class", "pagedtable-index-separator-right");
pageSeparator.appendChild(document.createTextNode("..."))
pageNumbers.appendChild(pageSeparator);
var pageLink = createPageLink(page.total - 1);
pageNumbers.appendChild(pageLink);
}
if (data.length > page.rows) footer.appendChild(pageNumbers);
var previous = document.createElement("a");
previous.appendChild(document.createTextNode("Previous"));
previous.onclick = function() {
page.setPageNumber(page.number - 1);
renderBody();
renderFooter();
triggerOnChange();
};
if (data.length > page.rows) footer.appendChild(previous);
var infoLabel = document.createElement("div");
infoLabel.setAttribute("class", "pagedtable-info");
infoLabel.setAttribute("title", getLabelInfo());
infoLabel.appendChild(document.createTextNode(getLabelInfo()));
footer.appendChild(infoLabel);
var enabledClass = "pagedtable-index-nav";
var disabledClass = "pagedtable-index-nav pagedtable-index-nav-disabled";
previous.setAttribute("class", page.number <= 0 ? disabledClass : enabledClass);
next.setAttribute("class", (page.number + 1) * page.rows >= data.length ? disabledClass : enabledClass);
};
var measuresCell = null;
var renderMeasures = function() {
var measuresTable = document.createElement("table");
measuresTable.style.visibility = "hidden";
measuresTable.style.position = "absolute";
measuresTable.style.whiteSpace = "nowrap";
measuresTable.style.height = "auto";
measuresTable.style.width = "auto";
var measuresRow = document.createElement("tr");
measuresTable.appendChild(measuresRow);
measuresCell = document.createElement("td");
var sampleString = "ABCDEFGHIJ0123456789";
measuresCell.appendChild(document.createTextNode(sampleString));
measuresRow.appendChild(measuresCell);
tableDiv.appendChild(measuresTable);
}
me.init = function() {
tableDiv = document.createElement("div");
pagedTable.appendChild(tableDiv);
var pagedTableClass = data.length > 0 ?
"pagedtable pagedtable-not-empty" :
"pagedtable pagedtable-empty";
if (columns.total == 0 || (columns.emptyNames() && data.length == 0)) {
pagedTableClass = pagedTableClass + " pagedtable-empty-columns";
}
tableDiv.setAttribute("class", pagedTableClass);
renderMeasures();
measurer.calculate(measuresCell);
columns.calculateWidths(measurer.measures);
table = document.createElement("table");
table.setAttribute("cellspacing", "0");
table.setAttribute("class", "table table-condensed");
tableDiv.appendChild(table);
table.appendChild(document.createElement("thead"));
var footerDiv = document.createElement("div");
footerDiv.setAttribute("class", "pagedtable-footer");
tableDiv.appendChild(footerDiv);
// if the host has not yet provided horizontal space, render hidden
if (tableDiv.clientWidth <= 0) {
tableDiv.style.opacity = "0";
}
me.render();
// retry seizing columns later if the host has not provided space
function retryFit() {
if (tableDiv.clientWidth <= 0) {
setTimeout(retryFit, 100);
} else {
me.render();
triggerOnChange();
}
}
if (tableDiv.clientWidth <= 0) {
retryFit();
}
};
var registerWidths = function() {
columns.subset = columns.subset.map(function(column) {
column.width = columns.widths[column.name].inner;
return column;
});
};
var parsePadding = function(value) {
return parseInt(value) >= 0 ? parseInt(value) : 0;
};
me.fixedHeight = function() {
return options.rows.max != null;
}
me.fitRows = function() {
if (me.fixedHeight())
return;
measurer.calculate(measuresCell);
var rows = options.rows.min !== null ? options.rows.min : 0;
var headerHeight = header !== null && header.offsetHeight > 0 ? header.offsetHeight : 0;
var footerHeight = footer !== null && footer.offsetHeight > 0 ? footer.offsetHeight : 0;
if (pagedTable.offsetHeight > 0) {
var availableHeight = pagedTable.offsetHeight - headerHeight - footerHeight;
rows = Math.floor((availableHeight) / measurer.measures.height);
}
rows = options.rows.min !== null ? Math.max(options.rows.min, rows) : rows;
page.setRows(rows);
}
// The goal of this function is to add as many columns as possible
// starting from left-to-right, when the right most limit is reached
// it tries to add columns from the left as well.
//
// When startBackwards is true columns are added from right-to-left
me.fitColumns = function(startBackwards) {
measurer.calculate(measuresCell);
columns.calculateWidths(measurer.measures);
if (tableDiv.clientWidth > 0) {
tableDiv.style.opacity = 1;
}
var visibleColumns = tableDiv.clientWidth <= 0 ? Math.max(columns.min, 1) : 1;
var columnNumber = columns.number;
var paddingCount = 0;
// track a list of added columns as we build the visible ones to allow us
// to remove columns when they don't fit anymore.
var columnHistory = [];
var lastTableHeight = 0;
var backwards = startBackwards;
var tableDivStyle = window.getComputedStyle(tableDiv, null);
var tableDivPadding = parsePadding(tableDivStyle.paddingLeft) +
parsePadding(tableDivStyle.paddingRight);
var addPaddingCol = false;
var currentWidth = 0;
while (true) {
columns.setVisibleColumns(columnNumber, visibleColumns, paddingCount);
currentWidth = columns.getWidth();
if (tableDiv.clientWidth - tableDivPadding < currentWidth) {
break;
}
columnHistory.push({
columnNumber: columnNumber,
visibleColumns: visibleColumns,
paddingCount: paddingCount
});
if (columnHistory.length > 100) {
console.error("More than 100 tries to fit columns, aborting");
break;
}
if (columns.max !== null &&
columns.visible + columns.getPaddingCount() >= columns.max) {
break;
}
// if we run out of right-columns
if (!backwards && columnNumber + columns.visible >= columns.total) {
// if we started adding right-columns, try adding left-columns
if (!startBackwards && columnNumber > 0) {
backwards = true;
}
else if (columns.min === null || visibleColumns + columns.getPaddingCount() >= columns.min) {
break;
}
else {
paddingCount = paddingCount + 1;
}
}
// if we run out of left-columns
if (backwards && columnNumber == 0) {
// if we started adding left-columns, try adding right-columns
if (startBackwards && columnNumber + columns.visible < columns.total) {
backwards = false;
}
else if (columns.min === null || visibleColumns + columns.getPaddingCount() >= columns.min) {
break;
}
else {
paddingCount = paddingCount + 1;
}
}
// when moving backwards try fitting left columns first
if (backwards && columnNumber > 0) {
columnNumber = columnNumber - 1;
}
if (columnNumber + visibleColumns < columns.total) {
visibleColumns = visibleColumns + 1;
}
}
var lastRenderableColumn = {
columnNumber: columnNumber,
visibleColumns: visibleColumns,
paddingCount: paddingCount
};
if (columnHistory.length > 0) {
lastRenderableColumn = columnHistory[columnHistory.length - 1];
}
columns.setVisibleColumns(
lastRenderableColumn.columnNumber,
lastRenderableColumn.visibleColumns,
lastRenderableColumn.paddingCount);
if (pagedTable.offsetWidth > 0) {
page.setVisiblePages(Math.max(Math.ceil(1.0 * (pagedTable.offsetWidth - 250) / 40), 2));
}
registerWidths();
};
me.fit = function(startBackwards) {
me.fitRows();
me.fitColumns(startBackwards);
}
me.render = function() {
me.fitColumns(false);
// render header/footer to measure height accurately
renderHeader();
renderFooter();
me.fitRows();
renderBody();
// re-render footer to match new rows
renderFooter();
}
var resizeLastWidth = -1;
var resizeLastHeight = -1;
var resizeNewWidth = -1;
var resizeNewHeight = -1;
var resizePending = false;
me.resize = function(newWidth, newHeight) {
function resizeDelayed() {
resizePending = false;
if (
(resizeNewWidth !== resizeLastWidth) ||
(!me.fixedHeight() && resizeNewHeight !== resizeLastHeight)
) {
resizeLastWidth = resizeNewWidth;
resizeLastHeight = resizeNewHeight;
setTimeout(resizeDelayed, 200);
resizePending = true;
} else {
me.render();
triggerOnChange();
resizeLastWidth = -1;
resizeLastHeight = -1;
}
}
resizeNewWidth = newWidth;
resizeNewHeight = newHeight;
if (!resizePending) resizeDelayed();
};
};
var PagedTableDoc;
(function (PagedTableDoc) {
var allPagedTables = [];
PagedTableDoc.initAll = function() {
allPagedTables = [];
var pagedTables = [].slice.call(document.querySelectorAll('[data-pagedtable="false"],[data-pagedtable=""]'));
pagedTables.forEach(function(pagedTable, idx) {
pagedTable.setAttribute("data-pagedtable", "true");
pagedTable.setAttribute("pagedtable-page", 0);
pagedTable.setAttribute("class", "pagedtable-wrapper");
var pagedTableInstance = new PagedTable(pagedTable);
pagedTableInstance.init();
allPagedTables.push(pagedTableInstance);
});
};
PagedTableDoc.resizeAll = function() {
allPagedTables.forEach(function(pagedTable) {
pagedTable.render();
});
};
window.addEventListener("resize", PagedTableDoc.resizeAll);
return PagedTableDoc;
})(PagedTableDoc || (PagedTableDoc = {}));
window.onload = function() {
PagedTableDoc.initAll();
};
</script>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<style type="text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
</head>
<body>
<div class="container-fluid main-container">
<div class="fluid-row" id="header">
<h1 class="title toc-ignore">R Notebook</h1>
</div>
<p>This is an <a href="http://rmarkdown.rstudio.com">R Markdown</a> Notebook. When you execute code within the notebook, the results appear beneath the code.</p>
<p>Try executing this chunk by clicking the <em>Run</em> button within the chunk or by placing your cursor inside it and pressing <em>Ctrl+Shift+Enter</em>.</p>
<pre class="r"><code>plot(cars)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAADAFBMVEUAAAABAQECAgIDAwMEBAQFBQUGBgYHBwcICAgJCQkKCgoLCwsMDAwNDQ0ODg4PDw8QEBARERESEhITExMUFBQVFRUWFhYXFxcYGBgZGRkaGhobGxscHBwdHR0eHh4fHx8gICAhISEiIiIjIyMkJCQlJSUmJiYnJycoKCgpKSkqKiorKyssLCwtLS0uLi4vLy8wMDAxMTEyMjIzMzM0NDQ1NTU2NjY3Nzc4ODg5OTk6Ojo7Ozs8PDw9PT0+Pj4/Pz9AQEBBQUFCQkJDQ0NERERFRUVGRkZHR0dISEhJSUlKSkpLS0tMTExNTU1OTk5PT09QUFBRUVFSUlJTU1NUVFRVVVVWVlZXV1dYWFhZWVlaWlpbW1tcXFxdXV1eXl5fX19gYGBhYWFiYmJjY2NkZGRlZWVmZmZnZ2doaGhpaWlqampra2tsbGxtbW1ubm5vb29wcHBxcXFycnJzc3N0dHR1dXV2dnZ3d3d4eHh5eXl6enp7e3t8fHx9fX1+fn5/f3+AgICBgYGCgoKDg4OEhISFhYWGhoaHh4eIiIiJiYmKioqLi4uMjIyNjY2Ojo6Pj4+QkJCRkZGSkpKTk5OUlJSVlZWWlpaXl5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sIgABQCLCFAAsMhtAbr86YFHNqlXqUqDlj1u+rTA9OEEKIDEcVeA/ny8VwY17t5gcgACFEDiuCpA784K5qYnr1qlnFCENptrbgQCFEDiuClAH/En5n63fvRX8JP7ml9e6l1Zarja1BAEKIDEcVGA/p2v/DEltqztLQ0yNQYBCiBxXBSgD0vjS287
<p>Add a new chunk by clicking the <em>Insert Chunk</em> button on the toolbar or by pressing <em>Ctrl+Alt+I</em>.</p>
<p>When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the <em>Preview</em> button or press <em>Ctrl+Shift+K</em> to preview the HTML file).</p>
<p>The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike <em>Knit</em>, <em>Preview</em> does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.</p>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open')
});
});
</script>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>